增加redis缓存防止重复数据
continuous-integration/drone/push Build is passing Details

master
YXY 1 year ago
parent e9ca2de5f2
commit c35e25a74c

@ -469,7 +469,7 @@ public abstract class SyncAccountsJobAbstract {
body.put(larkLabel, this.changeValueType(value, cjtSyncTypeRelation));
}
uniqueKey = String.join("_", uniqueKeyList).toUpperCase() + "_" + addRecordRequest.getAppTable();
Boolean existFlag = redisCache.setCacheObjectIfAbsent(uniqueKey, uniqueKey, 5L, TimeUnit.MINUTES);
Boolean existFlag = redisCache.setCacheObjectIfAbsent("CJT_JOB_CACHE:"+uniqueKey, "1", 5L, TimeUnit.MINUTES);
if (repeatMap.containsKey(uniqueKey) || !existFlag) {
continue;
}

Loading…
Cancel
Save