huanghongfa
2021-07-02 ffcd3e31c9938eb256d616c80edbe1821e9fb2bf
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;
    }
}