| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMcsMerchant(McsMerchantDTO mcsMerchantDTO) { |
| | | McsMerchant existMerchant = this.baseMapper.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getPhone, mcsMerchantDTO.getPhone())); |
| | | if (nonNull(existMerchant)) { |
| | | if (existMerchant.getIsDel()) { |
| | | this.baseMapper.deleteById(existMerchant.getId()); |
| | | } else { |
| | | return R.fail("手机号已存在"); |
| | | } |
| | | } |
| | | McsMerchant mcsMerchant = new McsMerchant(); |
| | | BeanUtils.copyProperties(mcsMerchantDTO, mcsMerchant); |
| | | Integer litDays = mcsMerchantDTO.getLitDays(); |