mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
新增 简单获取Snowflake 的 nextId方法
This commit is contained in:
parent
15aaf59cb3
commit
970a2c5044
@ -271,7 +271,7 @@ public class IdUtil {
|
||||
* @return nextId
|
||||
*/
|
||||
public static long getSnowflakeNextId() {
|
||||
return getSnowflake(1, 1).nextId();
|
||||
return getSnowflake().nextId();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -281,7 +281,7 @@ public class IdUtil {
|
||||
* @return nextIdStr
|
||||
*/
|
||||
public static String getSnowflakeNextIdStr() {
|
||||
return getSnowflake(1, 1).nextIdStr();
|
||||
return getSnowflake().nextIdStr();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user