1
0
mirror of synced 2025-12-16 18:18:10 +08:00
This commit is contained in:
zhouzj
2021-03-19 22:14:50 +08:00
parent 7ade620f9c
commit ffb9978f07
28 changed files with 476 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ public class IdGeneratorOptions {
public short Method = 1;
/**
* 开始时间
* 基础时间
* 不能超过当前系统时间
*/
public long BaseTime = 1582136402000L;

View File

@@ -34,8 +34,8 @@ public class StartUp {
options.BaseTime = 1582206693000L;
options.WorkerId = 1;
IIdGenerator IdGen = new DefaultIdGenerator(options);
GenTest genTest = new GenTest(IdGen, genIdCount, options.WorkerId);
IIdGenerator idGen = new DefaultIdGenerator(options);
GenTest genTest = new GenTest(idGen, genIdCount, options.WorkerId);
// 首先测试一下 IdHelper 方法获取单个Id
YitIdHelper.setIdGenerator(options);