This commit is contained in:
hucs
2024-06-14 18:00:21 +08:00
parent 12422d8c06
commit bc89723853
2 changed files with 9 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
package com.starry.common.utils;
import java.util.UUID;
import cn.hutool.core.util.RandomUtil;
/**
* @author admin
@@ -10,11 +10,11 @@ public class IdUtils {
/**
* 生成16位的UUID
* 生成8位的UUID
*
* @return UUID
*/
public static String getUuid() {
return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 12);
return RandomUtil.randomString(8);
}
}