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 1203075..6bbc8d2 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 @@ -123,20 +123,6 @@ public class SsoService { if (ObjectUtils.isEmpty(userJson)) { throw new RuntimeException("获取用户信息失败"); } - //获取身份证号 - String personCardNo = null; - JSONObject info = null; - if (userJson.containsKey("info")) { - info = userJson.getJSONObject("info"); - if (ObjectUtils.isNotEmpty(info) && info.containsKey("personCardNo")) { - personCardNo = info.getString("personCardNo"); - //解密处理 - if (StringUtils.isEmpty(personCardNo)) { - throw new RuntimeException("获取用户证件信息失败"); - } - personCardNo = EncryptUtil.decryptByAppIdAndSecret(personCardNo, webAppId, webAppSecret); - } - } //用身份证号查询用户 用户类型(01:个人,02:企业) // 转换成本地:app角色:0企业,1求职者,2网格员 3内部政府人员 4其他(浪潮用) @@ -170,20 +156,6 @@ public class SsoService { if (ObjectUtils.isEmpty(userJson)) { throw new RuntimeException("获取用户信息失败"); } - //获取身份证号 - String personCardNo = null; - JSONObject info = null; - if (userJson.containsKey("info")) { - info = userJson.getJSONObject("info"); - if (ObjectUtils.isNotEmpty(info) && info.containsKey("personCardNo")) { - personCardNo = info.getString("personCardNo"); - //解密处理 - if (StringUtils.isEmpty(personCardNo)) { - throw new RuntimeException("获取用户证件信息失败"); - } - personCardNo = EncryptUtil.decryptByAppIdAndSecret(personCardNo, webAppId, webAppSecret); - } - } //用身份证号查询用户 用户类型(01:个人,02:企业) // 转换成本地:app角色:0企业,1求职者,2网格员 3内部政府人员 4其他(浪潮用) @@ -440,7 +412,7 @@ public class SsoService { //获取身份证,再获取年龄 String personCardNo = null; - //1.求职者 2.网格员 + //0.企业 1.求职者 2.网格员 if ("0".equals(isCompanyUser)) { appUser.setName(userJson.getString("nickName")); appUser.setAddress(info.getString("entRegisteredAddress")); @@ -480,6 +452,7 @@ public class SsoService { AppUser checkUser = appUserService.selectAppuserByIdcardAndUserType(personCardNo, isCompanyUser); if (checkUser != null) { appUser.setUserId(checkUser.getUserId()); + appUser.setUserType(checkUser.getUserType()); appUserService.updateAppUser(appUser); } else { appUserService.insertAppUser(appUser);