101captain
2022-03-21 5b133299dc81466a0e26933589f43112a1722754
Merge remote-tracking branch 'origin/dev' into dev
1个文件已修改
13 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml
@@ -114,16 +114,19 @@
    <select id="getPopularMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT
            temp.id, temp.name, temp.introduction, temp.logo,
            temp.serviceScope, IF(SUM(temp.consultation_volume) is null, 0, SUM(temp.consultation_volume)) as monthConsultationVolume
            temp.serviceScope, IF(SUM(cccs.consultation_volume) is null, 0, SUM(cccs.consultation_volume)) as monthConsultationVolume
        FROM (
            SELECT
                ccm.id, ccm.name, ccm.introduction, ccm.logo,
                cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope
                GROUP_CONCAT(ccss.service_name) AS serviceScope
            FROM com_convenient_merchants ccm
            LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE ccm.area_code=#{areaCode} and  ( ccm.community_id = ${communityId} or ccm.community_id = 0)  AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心' GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
            WHERE ccm.area_code=#{areaCode} and  ( ccm.community_id = ${communityId} or ccm.community_id = 0)
            AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心'
            GROUP BY ccm.id
        ) temp
        LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON temp.id = cccs.merchant_id
        GROUP BY temp.id ORDER BY SUM(cccs.consultation_volume) DESC
    </select>
    <select id="getClassifyMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT