From 1f9e89315641a68147eaf8e1d5e325bd6a4637c6 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期五, 13 三月 2026 19:23:15 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi
---
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java
index 17d89af..d01cf2d 100644
--- a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java
+++ b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java
@@ -366,6 +366,12 @@
if (!isPhone) {
throw new ServiceException("以下帐号格式不正确:", I18nKeyConstant.ACCOUNT_FORMAT_ERROR,new Object[]{exportOperationsUserVo.getPhoneNumber()});
}
+ // 判断账号是否已存在
+ long count = this.count(Wrappers.lambdaQuery(XpOperationsUser.class)
+ .eq(XpOperationsUser::getPhoneNumber, exportOperationsUserVo.getPhoneNumber()));
+ if (count > 0) {
+ throw new ServiceException("以下帐号已存在:", I18nKeyConstant.ACCOUNT_EXIST,new Object[]{exportOperationsUserVo.getPhoneNumber()});
+ }
xpOperationsUser.setPhoneNumber(exportOperationsUserVo.getPhoneNumber());
xpOperationsUser.setPassword(SecurityUtils.encryptPassword("a123456"));
xpOperationsUser.setRemarks(exportOperationsUserVo.getRemarks());
--
Gitblit v1.7.1