1.添加修改求职者密码
2.添加修改管理员修改个人和企业密码接口 3.添加启用和禁用企业
This commit is contained in:
@@ -235,6 +235,7 @@ public class SsoService {
|
||||
if (ObjectUtils.isEmpty(userJson)) {
|
||||
throw new RuntimeException("获取用户信息失败");
|
||||
}
|
||||
Long lcUserid=userJson.getLong("userId");
|
||||
//用身份证号查询用户 用户类型(01:个人,02:企业)
|
||||
// 转换成本地:app角色:0企业,1求职者,2网格员 3内部政府人员 4其他(浪潮用)
|
||||
//userType对应appuser的isCompanyUser
|
||||
@@ -274,7 +275,7 @@ public class SsoService {
|
||||
//用户存在,生成本系统用户的token
|
||||
String token = loginSysUser(sysUser, userJson.getString("userName"));
|
||||
//缓存浪潮互联网token
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+appUser.getUserId(),lcToken, 6, TimeUnit.HOURS);
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+lcUserid,lcToken, 6, TimeUnit.HOURS);
|
||||
JSONObject backJson = new JSONObject();
|
||||
backJson.put("token", token);
|
||||
backJson.put("lcToken", lcToken);
|
||||
@@ -326,6 +327,7 @@ public class SsoService {
|
||||
throw new RuntimeException("获取用户信息失败");
|
||||
}
|
||||
|
||||
Long lcUserid=userJson.getLong("userId");
|
||||
//用身份证号查询用户 用户类型(01:个人,02:企业)
|
||||
// 转换成本地:app角色:0企业,1求职者,2网格员 3内部政府人员 4其他(浪潮用)
|
||||
//取角色判断是网格员2,还是内部工作者3
|
||||
@@ -359,7 +361,7 @@ public class SsoService {
|
||||
|
||||
//用户存在,生成本系统用户的token
|
||||
String token = loginSysUser(sysUser, userJson.getString("userName"));
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+appUserId,lcToken, 6, TimeUnit.HOURS);
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+lcUserid,lcToken, 6, TimeUnit.HOURS);
|
||||
JSONObject backJson = new JSONObject();
|
||||
backJson.put("token", token);
|
||||
backJson.put("lcToken", lcToken);
|
||||
@@ -438,7 +440,8 @@ public class SsoService {
|
||||
//保存appuser用户
|
||||
private AppUser saveAppUser(JSONObject userJson, String isCompanyUser, String appId, String appSecret) {
|
||||
JSONObject info = userJson.containsKey("info") ? userJson.getJSONObject("info") : null;
|
||||
System.out.println("userId===========" + userJson.getLong("userId"));
|
||||
Long lcUserid=userJson.getLong("userId");
|
||||
System.out.println("userId===========" + lcUserid);
|
||||
System.out.println("userJson===========" + JSONObject.toJSONString(userJson));
|
||||
AppUser appUser = new AppUser();
|
||||
//app角色:0企业,1求职者,2网格员 3内部政府人员 4其他(浪潮用)
|
||||
@@ -451,6 +454,7 @@ public class SsoService {
|
||||
appUser.setLoginDate(new Date());
|
||||
appUser.setCreateBy("system");
|
||||
appUser.setLoginIp(IpUtils.getIpAddr());
|
||||
appUser.setLcUserid(lcUserid);
|
||||
|
||||
//获取身份证,再获取年龄
|
||||
String personCardNo = null;
|
||||
@@ -511,11 +515,12 @@ public class SsoService {
|
||||
*/
|
||||
private SysUser saveSysUser(JSONObject userJson, Long appUserId, String isCompanyUser, String appId, String appSecret) {
|
||||
JSONObject info = userJson.containsKey("info") ? userJson.getJSONObject("info") : null;
|
||||
System.out.println("sysuserId==========" + userJson.getLong("userId"));
|
||||
Long lcUserid=userJson.getLong("userId");
|
||||
System.out.println("sysuserId==========" + lcUserid);
|
||||
System.out.println("userJson==========" + JSONObject.toJSONString(userJson));
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setAppUserId(appUserId);
|
||||
sysUser.setUserId(userJson.getLong("userId"));
|
||||
sysUser.setUserId(lcUserid);
|
||||
sysUser.setUserName(userJson.getString("userName"));
|
||||
sysUser.setNickName(userJson.getString("nickName"));
|
||||
sysUser.setEmail(userJson.getString("email"));
|
||||
@@ -528,6 +533,7 @@ public class SsoService {
|
||||
sysUser.setLoginDate(new Date());
|
||||
sysUser.setCreateBy("system");
|
||||
sysUser.setLoginIp(IpUtils.getIpAddr());
|
||||
sysUser.setLcUserid(lcUserid);
|
||||
|
||||
//获取身份证
|
||||
String personCardNo="";
|
||||
|
||||
Reference in New Issue
Block a user