he2802 2 lat temu
rodzic
commit
5c012e3af3

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -514,6 +514,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                         if(Validator.isNotEmpty(user2)){
                             throw new CustomException("身份证号码已存在,创建失败");
                         }
+                        idcard = idcard.trim();
                         objectLambdaUpdateWrapper.set(User::getIdCard, idcard);
                     }
                 }
@@ -527,6 +528,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                         if(Validator.isNotEmpty(user2)){
                             throw new CustomException("手机号码已存在,创建失败");
                         }
+                        telphone = telphone.trim();
                         objectLambdaUpdateWrapper.set(User::getTelphone, telphone);
                     }
                 }
@@ -535,6 +537,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 name = JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue();
                 if(Validator.isNotEmpty(name)){
                     if(Validator.isNotEmpty(user)&&Validator.isEmpty(user.getRealname())) { //姓名为空是覆盖
+                        name = name.trim();
                         objectLambdaUpdateWrapper.set(User::getRealname, name);
                     }