小程序登录接口,保存浪潮的token
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user