未验证 提交 1908e6d1 编写于 作者: S samz406 提交者: GitHub

更新用户时填写已经存的用户名报错

更新用户名如果填写已经存在的用户名会报错。
上级 dd35addf
......@@ -218,7 +218,7 @@ public class UsersService extends BaseService {
if (StringUtils.isNotEmpty(userName)) {
User tempUser = userMapper.queryByUserName(userName);
if (tempUser != null && tempUser.getId() != userId) {
putMsg(result, Status.USER_NAME_EXIST, userName);
putMsg(result, Status.USER_NAME_EXIST);
return result;
}
user.setUserName(userName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册