| | |
| | | } |
| | | if (applicationMapper.selectCount(new LambdaQueryWrapper<GuideApplication>() |
| | | .eq(GuideApplication::getIdCardNo, idCardNo) |
| | | .ne(GuideApplication::getMobile, phone) |
| | | .in(GuideApplication::getAuditStatus, PENDING, APPROVED)) > 0) { |
| | | throw new BusinessException(409, "该身份证号已提交过导游申请"); |
| | | } |
| | |
| | | |
| | | private void ensurePhoneCanRegister(String phone) { |
| | | com.tourguide.modules.user.entity.GuideUser guide = guideUserService.findByPhone(phone); |
| | | if (guide != null && (guide.getStatus() == null || guide.getStatus() != 2)) { |
| | | if (guide != null && (guide.getStatus() == null |
| | | || (guide.getStatus() != GuideUserService.STATUS_PENDING |
| | | && guide.getStatus() != GuideUserService.STATUS_CANCELLED))) { |
| | | throw new BusinessException(409, "该手机号已注册为导游"); |
| | | } |
| | | if (applicationMapper.selectCount(new LambdaQueryWrapper<GuideApplication>() |