From ac9e3f2ca4d2255739f8b60165f5b51b31ccd3e6 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 13 一月 2023 23:04:08 +0800 Subject: [PATCH] update 适配 springdoc 新版本配置方式 --- ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java index 66827cb..7c2fa2a 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java @@ -85,12 +85,16 @@ @AfterReturning(pointcut = "@annotation(repeatSubmit)", returning = "jsonResult") public void doAfterReturning(JoinPoint joinPoint, RepeatSubmit repeatSubmit, Object jsonResult) { if (jsonResult instanceof R) { - R<?> r = (R<?>) jsonResult; - if (r.getCode() == R.SUCCESS) { - return; + try { + R<?> r = (R<?>) jsonResult; + // 鎴愬姛鍒欎笉鍒犻櫎redis鏁版嵁 淇濊瘉鍦ㄦ湁鏁堟椂闂村唴鏃犳硶閲嶅鎻愪氦 + if (r.getCode() == R.SUCCESS) { + return; + } + RedisUtils.deleteObject(KEY_CACHE.get()); + } finally { + KEY_CACHE.remove(); } - RedisUtils.deleteObject(KEY_CACHE.get()); - KEY_CACHE.remove(); } } -- Gitblit v1.9.3