小程序登录接口,保存浪潮的token

This commit is contained in:
chenshaohua
2026-07-11 21:28:14 +08:00
parent 78ecff8435
commit d9613c0b83

View File

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