From defa041e83474cb2cd9c9a03d128af3882a35f1d Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 1 Dec 2021 17:08:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/cweb/config/AuthConfig.java | 1 + .../cweb/controller/HighUserController.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java b/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java index 78cfb369..c119e8c6 100644 --- a/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -111,6 +111,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/user/getUnionId") .excludePathPatterns("/highUser/setCacheParam") .excludePathPatterns("/highUser/getCacheParam") + .excludePathPatterns("/highUser/delCacheParam") .excludePathPatterns("/order/orderToH5Pay") .excludePathPatterns("/order/orderToPay") .excludePathPatterns("/test/*") diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java index 7d3c9ee1..45d7cfe2 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java @@ -241,5 +241,23 @@ public class HighUserController { } } + @RequestMapping(value="/delCacheParam",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "删除设置用户参数") + public ResponseData delCacheParam(@RequestParam(name = "key", required = true) String key) { + try { + + Object param = redisUtil.hget("PROVISIONAL_CACHE_PARAM", key); + if (param != null) { + redisUtil.hdel("PROVISIONAL_CACHE_PARAM", key); + } + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("CommonController --> delCacheParam() error!", e); + return ResponseMsgUtil.exception(e); + } + } + }