xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/constant/I18nKeyConstant.java
@@ -29,6 +29,8 @@ String ACCOUNT_UNIQUE_NUMBER_DUPLICATE = "account.unique.number.duplicate"; String ACCOUNT_CURRENT_USER_NOT_DELETE = "account.current.user.not.delete"; String ACCOUNT_NOT_ALLOWED_OPERATE_ADMIN = "account.not.allowed.operate.admin"; //手机号格式错误 String ACCOUNT_FORMAT_ERROR = "account.format.error"; //========== 角色相关 ========== String ROLE_NAME_EXISTS = "role.name.exists"; xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java
@@ -2,6 +2,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.PhoneUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -353,6 +354,10 @@ xpOperationsUser.setNickName(exportOperationsUserVo.getNickName()); xpOperationsUser.setUniqueNumber(exportOperationsUserVo.getUniqueNumber()); xpOperationsUser.setAvatar(exportOperationsUserVo.getAvatar()); boolean isPhone = PhoneUtil.isPhone(exportOperationsUserVo.getPhoneNumber()); if (!isPhone) { throw new ServiceException("以下帐号格式不正确:", I18nKeyConstant.ACCOUNT_FORMAT_ERROR, new Object[]{exportOperationsUserVo.getPhoneNumber()}); } xpOperationsUser.setPhoneNumber(exportOperationsUserVo.getPhoneNumber()); xpOperationsUser.setPassword(SecurityUtils.encryptPassword("a123456")); xpOperationsUser.setRemarks(exportOperationsUserVo.getRemarks()); xp-robotaxi-account-boot/src/main/resources/i18n/messages.properties
@@ -33,3 +33,4 @@ request.failed=请求失败,请稍后重试! sms.push.failed=短信发送失败,请稍后重试! sys.group.delete.fail=删除失败,该权限组已关联角色 account.format.error=以下帐号格式不正确:{0} xp-robotaxi-account-boot/src/main/resources/i18n/messages_en_US.properties
@@ -33,3 +33,4 @@ request.failed=Request failed. Please try again later! sms.push.failed=SMS sending failed. Please try again later! sys.group.delete.fail=Deletion failed. This permission group has been associated with a role account.format.error=The following account format is incorrect: {0} xp-robotaxi-account-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -33,3 +33,4 @@ request.failed=请求失败,请稍后重试! sms.push.failed=短信发送失败,请稍后重试! sys.group.delete.fail=删除失败,该权限组已关联角色 account.format.error=以下帐号格式不正确:{0}