Commit fac6683d authored by cjl's avatar cjl
Browse files

批量添加序列号的方法添加线程同步

parent ca1be886
......@@ -350,8 +350,13 @@ public class SerialNumberService {
//当前用户
User userInfo=userService.getCurrentUser();
Long userId=userInfo==null?null:userInfo.getId();
Date date = new Date();
Long million=date.getTime();
Date date = null;
Long million=null;
synchronized(this){
date = new Date();
million=date.getTime();
}
int insertNum=0;
StringBuffer prefixBuf=new StringBuffer(serialNumberPrefix).append(million);
do{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment