lidongdong
2023-09-04 b2fce0dc7dc4ea5dec9792a2bc3ceb9d33d6e07b
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java
@@ -122,10 +122,11 @@
        String mobilePhone = convenientMerchantDTO.getMobilePhone();
        ConvenientMerchantDO merchantDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ConvenientMerchantDO>().eq(ConvenientMerchantDO::getMobilePhone, mobilePhone));
        ConvenientMerchantDO convenientMerchantDO = this.baseMapper.selectById(merchantId);
        BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO);
        if (isNull(convenientMerchantDO)) {
            return R.fail("商家不存在");
        }
        Long createBy = convenientMerchantDO.getCreatedBy();
        BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO);
        if (nonNull(merchantDO) && !merchantDO.getId().equals(convenientMerchantDO.getId())) {
            R.fail("该微信手机号:" + mobilePhone + "已被使用!请更换");
        }
@@ -152,7 +153,7 @@
            serviceIds.forEach(serviceId -> {
                ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId);
                convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(), merchantId, serviceId,
                        convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy());
                        convenientServiceCategoryDO.getName(), createBy);
            });
        }