| | |
| | | if (Objects.equals(detail.getStatus(), CODE_STATUS_BOUND)) { |
| | | throw new ServiceException("兑换码已绑定"); |
| | | } |
| | | String bindPhone = StringUtils.hasText(dto.getPhone()) ? dto.getPhone() : phone; |
| | | String bindPhone = StringUtils.hasText(phone) ? phone : dto.getPhone(); |
| | | if (!StringUtils.hasText(bindPhone)) { |
| | | throw new ServiceException("绑定手机号不能为空"); |
| | | } |
| | | if (Objects.equals(exchangePackage.getUnlimitedReceiveLimit(), 1) && exchangePackage.getReceiveLimit() != null) { |
| | | if (exchangePackage.getReceiveLimit() != null && exchangePackage.getReceiveLimit() > 0) { |
| | | Long bindCount = codeDetailMapper.selectCount(new QueryWrapper<TExchangeCodeDetail>() |
| | | .eq("package_id", exchangePackage.getId()) |
| | | .eq("bind_phone", bindPhone) |