From 48c62c7328bf185176d69446a373f11993930b1e Mon Sep 17 00:00:00 2001 From: chenyanchang <30190327@qq.com> Date: Mon, 29 Jun 2026 16:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E5=8D=95=E7=82=B9?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=9B=B4=E6=96=B0appUser=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E5=8E=9F=E6=9C=89=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?userType=E5=AD=97=E6=AE=B5=EF=BC=88=E6=AD=A4=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=94=A8=E4=BA=8E=E6=94=BF=E7=AD=96=E6=9F=A5=E8=AF=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/web/service/SsoService.java | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) 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);