From e4c05d381d2dadf129b3a4cb499c8ea67e7fc481 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 08 Nov 2021 17:19:47 +0800
Subject: [PATCH] fix
---
zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
index d175ec5..e4fdf69 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
@@ -1,24 +1,25 @@
package com.matrix.system.app.action;
-import com.matrix.component.redis.RedisClient;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.WebUtil;
-import com.matrix.system.app.dto.*;
-import com.matrix.system.app.mapper.SysBeauticianStateMapper;
+import com.matrix.system.app.dto.BeauticianDto;
+import com.matrix.system.app.dto.ModifyUserDto;
+import com.matrix.system.app.dto.PwdModifyDto;
+import com.matrix.system.app.dto.UsersQueryDto;
import com.matrix.system.app.mapper.SysUsersMapper;
import com.matrix.system.app.mapper.SysWorkBeatuistaffMapper;
import com.matrix.system.app.vo.BeauticianVo;
import com.matrix.system.app.vo.UserAchieveVo;
import com.matrix.system.app.vo.UserInfoDetailVo;
import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.init.LocalCache;
import com.matrix.system.common.interceptor.ApiUserLoginInterceptor;
import com.matrix.system.common.service.SysUsersService;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.common.tools.PasswordUtil;
import com.matrix.system.hive.action.BaseController;
-import com.matrix.system.hive.bean.SysBeauticianState;
import com.matrix.system.hive.bean.SysWorkBeatuistaff;
import com.matrix.system.hive.service.AchieveNewService;
import com.matrix.system.hive.service.SysWorkBeatuistaffService;
@@ -28,14 +29,13 @@
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
-import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -59,9 +59,8 @@
@Autowired
private SysWorkBeatuistaffService sysWorkBeatuistaffService;
- @Autowired
- private RedisClient redisClient;
-
+ @Value("${login_private_key}")
+ private String privateKey;
@ApiOperation(value = "个人中心--获取用户业绩接口 type 1-今日 2-昨天 3-本月 4-上月")
@ApiResponses({
@@ -104,8 +103,8 @@
@ApiOperation(value = "退出登陆", notes = "退出登陆")
@GetMapping(value = "/loginOut")
public AjaxResult loginOut(HttpServletRequest request) {
- String token=ApiUserLoginInterceptor.resolveToken(request);
- redisClient.removeObject(token);
+ String token=ApiUserLoginInterceptor.resolveToken(request,privateKey);
+ LocalCache.remove(token);
return AjaxResult.buildSuccessInstance("退出成功");
}
--
Gitblit v1.9.1