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);