From 71a93b051519825a5eb930685f33b251f38ab7e8 Mon Sep 17 00:00:00 2001 From: yjxx <1055683039@qq.com> Date: Sat, 19 Oct 2024 15:01:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E6=94=B6=E9=80=9A=E7=94=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B9=B6=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/jty/expressdistributionsystem/controller/UserController.java b/src/main/java/jty/expressdistributionsystem/controller/UserController.java index cff2ff9..ad7deee 100644 --- a/src/main/java/jty/expressdistributionsystem/controller/UserController.java +++ b/src/main/java/jty/expressdistributionsystem/controller/UserController.java @@ -45,10 +45,12 @@ public class UserController { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_name", user.getUserName()) .or() - .eq("account", user.getAccount()); + .eq("account", user.getAccount()) + .or() + .eq("phone", user.getPhone()); User u = userService.getOne(queryWrapper); if (u != null) { - return new Result<>(409, "用户已存在", ""); + return new Result<>(409, "账号或用户名或手机号已存在", ""); } // 密码加密 user.setPassword(Md5Util.getMD5String(user.getPassword()));