package com.sjyt.icom.asst.common.util;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * <p>id工具类</p>
 *
 * @author renyanru
 * @version V1.0.0
 * @date 2022/6/13 10:00
 */
public class IdUtils {
    /**
     * 雪花id
     * @return id
     */
    public static long snowflake(){
        Snowflake snowflake= IdUtil.getSnowflake(1,1);
        return snowflake.nextId();
    }
    /**
     * uuid带-的字符串
     * @return id
     */
    public static String randomUUID(){
        return IdUtil.randomUUID();
    }
    /**
     * uuid不带-的字符串
     * @return id
     */
    public static String simpleUUID(){
        return IdUtil.simpleUUID();
    }
}
