fengjin
2022-09-27 f0cbcb0bced4b126d27d209a3d1aa3d5ea7d9e6d
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;
    }
}