From d9613c0b837b64a72dc94f29fecebd2e963a8c6d Mon Sep 17 00:00:00 2001 From: chenshaohua <635616957@qq.com> Date: Sat, 11 Jul 2026 21:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BF=9D=E5=AD=98=E6=B5=AA=E6=BD=AE?= =?UTF-8?q?=E7=9A=84token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/framework/web/service/SsoService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SsoService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SsoService.java index 7d48ae5..f38a7fe 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SsoService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SsoService.java @@ -177,6 +177,7 @@ public class SsoService { throw new RuntimeException("获取用户信息失败"); } + Long lcUserid=userJson.getLong("userId"); //用身份证号查询用户 用户类型(01:个人,02:企业) // 转换成本地:app角色:0企业,1求职者,2网格员 3内部政府人员 4其他(浪潮用) String isCompanyUser = userJson.getString("userType"); @@ -202,6 +203,8 @@ public class SsoService { saveSysUser(userJson, appUser.getUserId(), isCompanyUser, webAppId, webAppSecret); //用户存在,生成本系统用户的token String token = loginAppUser(appUser, userJson.getString("userName")); + //缓存浪潮互联网token + redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+lcUserid,lcToken, 6, TimeUnit.HOURS); JSONObject backJson = new JSONObject(); backJson.put("token", token); backJson.put("lcToken", lcToken);