jinlin
2024-01-29 7a0c5479c363a10f573aa15a54dc8130eabd47ff
zt/core/src/main/java/com/zt/security/service/SysUserTokenService.java
@@ -73,6 +73,7 @@
        // String token;
        String roleNames = sysUserService.getRoleNames(userId);
        // 当前时间
        Date now = new Date();
        // 过期时间
@@ -146,12 +147,14 @@
        CacheUtils.removeAll(Constant.Cache.TOKEN);
        //CacheUtils.remove(Constant.Cache.TOKEN,token);
        //CacheUtils.put(Constant.Cache.TOKEN,token,tokenEntity);
        SysUser user = sysUserService.get(userId);
        Integer secretClass = user.getSecretClass();
        Map<String, Object> map = new HashMap<>();
        map.put(Constant.Sys.TOKEN_HEADER, token);
        map.put("expire", EXPIRE);
        map.put("test", test);
        map.put("roleName", roleNames);
        map.put("userSecretClass", secretClass);
        map.put("info", "OK");
        loginProcess();
        return Result.ok().ok(map);