张天森
2023-02-07 f3e7ecf643ec517ad93b80a50e63eaab90b6461b
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java
@@ -125,6 +125,8 @@
        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 + "已被使用!请更换");
        }
@@ -151,10 +153,10 @@
            serviceIds.forEach(serviceId -> {
                ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId);
                convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(), merchantId, serviceId,
                        convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy());
                        convenientServiceCategoryDO.getName(), createBy);
            });
        }
        BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO);
        convenientMerchantDO.setIntroduction(convenientMerchantDTO.getIntroduction());
        this.baseMapper.updateById(convenientMerchantDO);
        return R.ok();