|
@@ -14,8 +14,7 @@ import org.springframework.stereotype.Component;
|
|
|
public class RandomUtils {
|
|
|
|
|
|
public static String randomString(int length){
|
|
|
- String baseString = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
|
- return RandomUtil.randomString(baseString, length);
|
|
|
+ return RandomUtils.getUuid("pano");
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
@@ -27,9 +26,8 @@ public class RandomUtils {
|
|
|
* preStr: 8位id前缀
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String getUuid(){
|
|
|
- return SnowFlakeUUidUtils.generaUUid(null, null, "pano");
|
|
|
-
|
|
|
+ public static String getUuid(String preStr){
|
|
|
+ return SnowFlakeUUidUtils.generaUUid(null, null, preStr);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -45,4 +43,4 @@ public class RandomUtils {
|
|
|
String baseString = "0123456789";
|
|
|
return RandomUtil.randomString(baseString, length);
|
|
|
}
|
|
|
-}
|
|
|
+}
|