diff --git a/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java b/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java index 87d6cd2..515b3bd 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java @@ -95,7 +95,7 @@ public class ArtistService { throw new BizException("用户名不允许修改"); } Integer count = userInfoDao.countByUserNameAndUserNameNotNullAndIdNot(artistRegisterDto.getUserName(), artistRegisterDto.getUserId()); - if (count == 0) { + if (count > 0) { throw new BizException("该用户名已存在,请重新输入!"); } userInfo = UserInfo.builder()