1 Star 0 Fork 1.4K

java-utils/DocSys

forked from Rainy/DocSys 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
UUid.java 456 Bytes
Copy Edit Raw Blame History
zju_rain authored 2017-09-28 11:12 +08:00 . DocSys First Version
package util;
import java.util.Date;
public class UUid {
public static String getUUID(String idstr){
Date date = new Date();
String d = DateFormat.dateTimeSSSFormat(date);
String radomNum = Math.round(Math.random()*100000)+"";
int bl = 6-radomNum.length();
for(int i = 0; i<(bl); i++){
radomNum = "0"+radomNum;
}
idstr = "000000" + idstr;
idstr = idstr.substring(idstr.length()-6, idstr.length());
return d + idstr + radomNum;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/java-utils/DocSys.git
git@gitee.com:java-utils/DocSys.git
java-utils
DocSys
DocSys
master

Search