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()));