两分钟内重复的数据不进行处理
continuous-integration/drone/push Build is passing Details

畅捷通同步方案更新
YXY 11 months ago
parent b4f25d47ac
commit 8c7aca05fe

@ -66,7 +66,7 @@ public abstract class CJTOperateCallBackAbstract {
CjtCallBackOperateEnum msgTypeEnum = req.getMsgTypeEnum();
String operateCallBackFlag = buildCacheUniqueKey(RedisConstants.CJT_CALLBACK_OPERATE, req.getAppId() + msgTypeEnum.getLarkCompanyCode() + req.getVoucherId());
try {
Boolean operateFlag = redisCache.setCacheObjectIfAbsent(operateCallBackFlag, operateCallBackFlag, 10L, TimeUnit.MINUTES);
Boolean operateFlag = redisCache.setCacheObjectIfAbsent(operateCallBackFlag, operateCallBackFlag, 2L, TimeUnit.MINUTES);
if (!operateFlag) {
return;
}
@ -77,15 +77,13 @@ public abstract class CJTOperateCallBackAbstract {
endHandle(req);
} catch (Exception e) {
log.error("{} execute error", this.getClass().getSimpleName(), e);
if (req.getRetry() && req.getRetryCount() < 3) {
if (req.getRetry() && req.getRetryCount() < 2) {
req.addRetryCount();
execute(req);
} else {
errorHandle(req, e);
larkRobotHelper.sendMessageByBot(ROBOT_GROUP, buildRobotErrorCountMessage(req, e));
}
} finally {
redisCache.deleteObject(operateCallBackFlag);
}
}

Loading…
Cancel
Save