修复bug

This commit is contained in:
高雄 2025-07-07 10:39:22 +08:00
parent db2b42af57
commit 14ba8266fa
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
if(StrUtil.isNotBlank(req.getMobile())){ if(StrUtil.isNotBlank(req.getMobile())){
LambdaQueryWrapper<UserEntity> mobileWrapper = Wrappers.lambdaQuery(UserEntity.class).eq(UserEntity::getMobile, req.getMobile()).eq(UserEntity::getDelFlag, Constants.DEL_FLAG_0); LambdaQueryWrapper<UserEntity> mobileWrapper = Wrappers.lambdaQuery(UserEntity.class).eq(UserEntity::getMobile, req.getMobile()).eq(UserEntity::getDelFlag, Constants.DEL_FLAG_0);
List<UserEntity> mobileUserList = this.list(mobileWrapper); List<UserEntity> mobileUserList = this.list(mobileWrapper);
if((originalEntity == null && !mobileUserList.isEmpty()) || (originalEntity != null && !originalEntity.getMobile().equals(req.getMobile()) && mobileUserList.size() > 1)){ if((originalEntity == null && !mobileUserList.isEmpty()) || (originalEntity != null && !originalEntity.getMobile().equals(req.getMobile()) && !mobileUserList.isEmpty())){
throw new ServiceException(Message.MOBILE_EXIST); throw new ServiceException(Message.MOBILE_EXIST);
} }