修改变量名

master
qi_liang 4 years ago
parent 678d5a2bb3
commit b6fe9cbdae
  1. 4
      panda-jdbc/src/main/java/org/panda/jdbc/id/SnowflakeIdGenerate.java

@ -9,7 +9,7 @@ public class SnowflakeIdGenerate implements IdGenerate<Long> {
/**
* 开始时间戳
*/
private final long twepoch = 1420041600000L;
private final long TWEPOCH = 1420041600000L;
/**
* 机器id所占的位数
@ -107,7 +107,7 @@ public class SnowflakeIdGenerate implements IdGenerate<Long> {
}
//上次生成ID的时间戳
lastTimeStamp = timestamp;
return ((timestamp-twepoch)<<timestampLeftShift)
return ((timestamp-TWEPOCH)<<timestampLeftShift)
|(dataCenterId<<dataCenterIdShift)
|(workerId<<workerIdShift)
|sequence;

Loading…
Cancel
Save