From 36f56e703e14ff7d0cf955a911680dc3dc958a08 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期五, 13 三月 2026 19:06:59 +0800
Subject: [PATCH] 运维人员导入修改

---
 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