wzy
2020-12-29 b90fe56ef4ac2f7f2645511eb9f06aa21bd9c7e3
zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
@@ -1,5 +1,6 @@
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;
@@ -50,6 +51,9 @@
    @Autowired
    private SysWorkBeatuistaffService sysWorkBeatuistaffService;
    @Autowired
    private RedisClient redisClient;
    @ApiOperation(value = "个人中心--获取用户业绩接口 type 1-今日 2-昨天 3-本月 4-上月")
    @ApiResponses({
@@ -89,4 +93,15 @@
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, SysWorkBeatuistaffMapper.INSTANCE.workBeautysToBeautyVos(workBeauty), 0);
    }
    @ApiOperation(value = "退出登陆", notes = "退出登陆")
    @GetMapping(value = "/loginOut")
    public AjaxResult loginOut() {
        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        String token = redisClient.getCachedValue(sysUsers.getSuId().toString());
        redisClient.removeObject(token);
        redisClient.removeObject(sysUsers.getSuId().toString());
        return AjaxResult.buildSuccessInstance("退出成功");
    }
}