更新用户名如果填写已经存在的用户名会报错。
@ -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);