修改了幂等性异常提示

This commit is contained in:
ajaxfan
2021-05-18 09:50:44 +08:00
parent 26cd94bcca
commit 33435e4ab8

View File

@ -64,7 +64,6 @@ public class IdempotentAspect {
}
Idempotent idempotent = method.getAnnotation(Idempotent.class);
/* key : url + 参数列表作为区分 */
String url = request.getRequestURL().toString();
String argString = JsonUtils.objectToJson(Arrays.asList(joinPoint.getArgs()));
@ -87,9 +86,8 @@ public class IdempotentAspect {
synchronized (this) {
boolean submitAble = redisTemplate.opsForValue().setIfAbsent(key, value, expireTime, timeUnit);
if (!submitAble) {
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("[idempotent]:" + info,true);
}
else {
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName(info, true);
} else {
log.info("[idempotent]:has stored key={},value={},expireTime={}{},now={}", key, value, expireTime,
timeUnit, LocalDateTime.now().toString());
}