lidongdong
2022-11-25 b3bc52d303a62b67791f193b6e84306f6462c3db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.dg.core.util;
 
 
import cn.hutool.core.util.IdUtil;
 
/**
 * 雪花id获取工具类
 * @author lyq
 * @date 2022-03-04
 */
public class Snowflake {
    public static long getId() {
        cn.hutool.core.lang.Snowflake snowflake = IdUtil.getSnowflake(1, 1);
        long id = snowflake.nextId();
        return id;
    }
}