jinlin
2024-01-12 bb3bc1c8508dc28d1780c2b0e068595baedb5100
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);
        User user = UserContext.getUser();
        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);