package com.integrated.zyyt.util;
|
|
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.RandomUtil;
|
|
/**
|
* @Description : IdUtil
|
* @Author : dhz
|
* @CreateTime : 2021/6/16 9:57
|
*/
|
public class IdGenerator {
|
|
// private static Snowflake snowflake;
|
|
public static Long getId() {
|
return IdUtil.getSnowflake(1,1).nextId();
|
// return snowflake.nextId();
|
}
|
|
// static {
|
// snowflake = IdUtil.createSnowflake(1, 1);
|
// }
|
|
public static String getUUID(){
|
return RandomUtil.simpleUUID();
|
}
|
}
|