fix 指令号生成

This commit is contained in:
USER-20220102CG\noblelift
2023-04-19 10:37:53 +08:00
parent 49a0c61938
commit 5f3acc4ddc
2 changed files with 15 additions and 9 deletions

View File

@@ -7,13 +7,15 @@ import java.util.HashMap;
public class CodeUtil {
public static synchronized String getNewCode(String ruleCode){
GenCodeService service=new GenCodeServiceImpl();
String flag = "1";
HashMap<String,String> map = new HashMap<>();
map.put("flag",flag);
map.put("code",ruleCode);
return service.codeDemo(map);
public static String getNewCode(String ruleCode){
synchronized (ruleCode) {
GenCodeService service=new GenCodeServiceImpl();
String flag = "1";
HashMap<String,String> map = new HashMap<>();
map.put("flag",flag);
map.put("code",ruleCode);
return service.codeDemo(map);
}
}
}