Browse Source

feat: 服务任务唯一值校验(提交任务校验)-唯一性key改为packageId+username+paramMd5

lixuesong 4 months ago
parent
commit
e773788aba

+ 1 - 1
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmTaskContentServiceImpl.java

@@ -1219,7 +1219,7 @@ public class WmTaskContentServiceImpl extends ServiceImpl<WmTaskContentMapper, W
         // 计算参数md5
         // 计算参数md5
         String paramMd5 = DigestUtil.md5Hex(toCheckParams);
         String paramMd5 = DigestUtil.md5Hex(toCheckParams);
 
 
-        String cacheKey1 = "save:task:content:ide:key:" + username + ":" + paramMd5;
+        String cacheKey1 = "save:task:content:ide:key:" + packageId + ":" + username + ":" + paramMd5;
 
 
         if (Boolean.FALSE.equals(redisTemplate.opsForValue().setIfAbsent(cacheKey1, toCheckParams, 90, TimeUnit.DAYS))) {
         if (Boolean.FALSE.equals(redisTemplate.opsForValue().setIfAbsent(cacheKey1, toCheckParams, 90, TimeUnit.DAYS))) {
             // 存在重复任务,则返回true
             // 存在重复任务,则返回true