验收通用功能并进行修改

grs
yjxx 1 month ago
parent 0bfdba7e35
commit 71a93b0515

@ -45,10 +45,12 @@ public class UserController {
QueryWrapper<User> queryWrapper = new QueryWrapper<>(); QueryWrapper<User> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_name", user.getUserName()) queryWrapper.eq("user_name", user.getUserName())
.or() .or()
.eq("account", user.getAccount()); .eq("account", user.getAccount())
.or()
.eq("phone", user.getPhone());
User u = userService.getOne(queryWrapper); User u = userService.getOne(queryWrapper);
if (u != null) { if (u != null) {
return new Result<>(409, "用户已存在", ""); return new Result<>(409, "账号或用户名或手机号已存在", "");
} }
// 密码加密 // 密码加密
user.setPassword(Md5Util.getMD5String(user.getPassword())); user.setPassword(Md5Util.getMD5String(user.getPassword()));

Loading…
Cancel
Save