lidongdong
2022-11-15 299fa0f3ef7897e09440bbee37316a9eb777a979
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;
    }
}