|
@@ -1630,6 +1630,24 @@ public class UserController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 清除用户缓存
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiLog("清除用户缓存")
|
|
|
+ @GetMapping("removeRedis")
|
|
|
+ public String removeRedis(String id){
|
|
|
+ if (StringUtils.isNotBlank(id)){
|
|
|
+ UserDTO userDTO = userService.get(id);
|
|
|
+ if (null != userDTO){
|
|
|
+ RedisUtils.getInstance().set(CacheNames.USER_CACHE_LOGIN_CODE + userDTO.getLoginName() , 0);
|
|
|
+ UserUtils.deleteCache ( userDTO );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "清除登录缓存成功";
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|