lidongdong
2023-03-15 7f38dc83c1e7bd26f6ff54631f4b4cc6cfed1d88
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package com.panzhihua.common.utlis;
 
import cn.hutool.core.util.IdUtil;
 
/**
 * @author xyh
 * @date 2021/6/10 15:29
 */
public class Snowflake {
    public static long getId() {
        cn.hutool.core.lang.Snowflake snowflake = IdUtil.getSnowflake(1, 1);
        long id = snowflake.nextId();
        return id;
    }
}