|
|
|
@ -45,10 +45,12 @@ public class UserController {
|
|
|
|
|
QueryWrapper<User> 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()));
|
|
|
|
|