cy
2022-11-18 08013d9f35bdfaa462916716f5c77b438af874fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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();
    }
}