puhanshu
2021-12-27 51504264ba33691d28fed78d3da48264db4c8402
bug修改-3044
2个文件已修改
16 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -19,7 +19,7 @@
        select (select count(*) from com_act_work_guide ) guide,
        (select count(*) from com_act_announcement where community_id = #{communityId}) announcement,
        (select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth,
        (select count(*) from com_convenient_merchants where community_id = #{communityId} and is_del =0) convenient,
        (select count(*) from com_convenient_merchants where (community_id = #{communityId} OR community_id = 0) and is_del =0) convenient,
        (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse,
        (select count(*) from com_property_alarm where community_id = #{communityId}) oneButton,
        (select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth,
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml
@@ -211,18 +211,18 @@
        SELECT * FROM (
        SELECT id, `name`, consultation_volume, view_num
        FROM com_convenient_merchants
        WHERE community_id = #{pagePopularMerchantDTO.communityId} AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100
        WHERE (community_id = #{pagePopularMerchantDTO.communityId} OR community_id = 0) AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100
        ) temp
    </select>
    <select id="getIndexMerchantBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo">
        SELECT
        (SELECT 0) AS resourceTypeNum,
        (SELECT COUNT(id) FROM com_convenient_merchants WHERE community_id = #{communityId} AND is_del = 0) AS merchantNum,
        (SELECT COUNT(id) FROM com_convenient_merchants WHERE (community_id = #{communityId} OR community_id = 0) AND is_del = 0) AS merchantNum,
        (SELECT SUM(t1.consultation_volume)
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE t2.community_id = #{communityId}) AS serviceTimes
        WHERE (t2.community_id = #{communityId} OR t2.community_id = 0)) AS serviceTimes
    </select>
    <select id="selectServiceTypeCircleData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
@@ -230,28 +230,28 @@
        FROM com_convenient_service_categories t1
        LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.service_category_id
        LEFT JOIN com_convenient_merchants t3 ON t2.merchant_id = t3.id
        WHERE t3.community_id = #{communityId} AND t3.is_del = 0 GROUP BY t1.id
        WHERE (t3.community_id = #{communityId} OR t3.community_id = 0) AND t3.is_del = 0 GROUP BY t1.id
    </select>
    <select id="getServiceTimesAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( t1.statistic_date, '%m' ) AS filed, SUM(t1.consultation_volume) AS num
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE t2.community_id = #{communityId} AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        WHERE (t2.community_id = #{communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getServiceTimesTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT IF(SUM(t1.consultation_volume) IS NULL,0,SUM(t1.consultation_volume)) AS num
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE t2.community_id = #{communityId} AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) &lt;= #{date}
        WHERE (t2.community_id = #{communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexMerchantList"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT t1.id, t1.`name`, t1.logo, t1.introduction, GROUP_CONCAT(t2.`service_name`) serviceScope
        FROM com_convenient_merchants t1
        LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.merchant_id
        WHERE t1.community_id = #{pageBaseDTO.communityId}
        WHERE (t1.community_id = #{pageBaseDTO.communityId} OR t1.community_id = 0)
        <if test="pageBaseDTO.paramId != null">
            AND t2.service_category_id = #{pageBaseDTO.paramId}
        </if>