101captain
2022-08-08 f961913156360edc2ad8b9febca8e4a7947848da
bug修改
3个文件已修改
11 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientServiceCategoryDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientServiceCategoryMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientServiceCategoryDAO.java
@@ -37,7 +37,7 @@
     * @param createdBy
     * @return
     */
    int createMerchantServiceRelation(@Param("merchantId") Long merchantId, @Param("serviceId") Long serviceId,
    int createMerchantServiceRelation(@Param("id")Long id,@Param("merchantId") Long merchantId, @Param("serviceId") Long serviceId,
                                      @Param("name") String name, @Param("createdBy") Long createdBy);
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java
@@ -12,6 +12,7 @@
import javax.annotation.Resource;
import com.panzhihua.common.utlis.Snowflake;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -111,7 +112,7 @@
                List<Long> serviceIds = convenientMerchantDTO.getServiceIds();
                serviceIds.forEach(serviceId -> {
                    ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId);
                    convenientServiceCategoryDAO.createMerchantServiceRelation(merchantId, serviceId,
                    convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(),merchantId, serviceId,
                            convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy());
                });
            }
@@ -159,7 +160,7 @@
            convenientServiceCategoryDAO.deleteMerchantServiceRelation(merchantId);
            serviceIds.forEach(serviceId -> {
                ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId);
                convenientServiceCategoryDAO.createMerchantServiceRelation(merchantId, serviceId,
                convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(),merchantId, serviceId,
                        convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy());
            });
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientServiceCategoryMapper.xml
@@ -21,8 +21,8 @@
    id,`name`,icon,remark,weight,is_del,created_at,created_by,updated_at,updated_by
    </sql>
    <insert id="createMerchantServiceRelation">
        INSERT INTO com_convenient_service_scope (merchant_id, service_category_id, service_name, created_by, created_at)
        VALUES (#{merchantId}, #{serviceId}, #{name}, #{createdBy}, NOW())
        INSERT INTO com_convenient_service_scope (id,merchant_id, service_category_id, service_name, created_by, created_at)
        VALUES (#{id},#{merchantId}, #{serviceId}, #{name}, #{createdBy}, NOW())
    </insert>
    <delete id="deleteMerchantServiceRelation">
        DELETE FROM com_convenient_service_scope WHERE merchant_id = #{merchantId}