统计sql添加条件

dev
862857010@qq.com 2 years ago
parent c398709a49
commit ea1643c06f
  1. 6
      cjy-project/src/main/resources/mapper/marketingdata/MarketingWechatMicroblogInfoMapper.xml

@ -233,7 +233,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN b_tour_info t4 ON t2.resource_code = t4.resource_code AND t2.organ_code = t4.organ_code AND t4.status=0 AND t4.del_flag != 2
LEFT JOIN b_venue_info t3 ON t2.resource_code = t3.resource_code AND t2.organ_code = t3.organ_code AND t3.status=0 AND t3.del_flag != 2
WHERE t1.statistics_time > DATE_ADD(CURRENT_DATE,INTERVAL -5 DAY) AND t1.type = #{type}
AND t1.organ_code = #{organCode} and t2.resource_code = #{resourceCode}
AND t1.organ_code = #{organCode} and t2.resource_code = #{resourceCode} and t1.del_flag != 2
group by t1.statistics_time
order by t1.statistics_time asc
</select>
@ -246,7 +246,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN b_tour_info t4 ON t2.resource_code = t4.resource_code AND t2.organ_code = t4.organ_code AND t4.status=0 AND t4.del_flag != 2
LEFT JOIN b_venue_info t3 ON t2.resource_code = t3.resource_code AND t2.organ_code = t3.organ_code AND t3.status=0 AND t3.del_flag != 2
WHERE t1.statistics_time > DATE_ADD(CURRENT_DATE,INTERVAL -5 DAY) AND t1.type = #{type}
AND t1.organ_code = #{organCode} and t2.resource_code = #{resourceCode}
AND t1.organ_code = #{organCode} and t2.resource_code = #{resourceCode} and t1.del_flag != 2
group by t1.statistics_time
order by t1.statistics_time asc
</select>
@ -259,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN b_tour_info t4 ON t2.resource_code = t4.resource_code AND t2.organ_code = t4.organ_code AND t4.status=0 AND t4.del_flag != 2
LEFT JOIN b_venue_info t3 ON t2.resource_code = t3.resource_code AND t2.organ_code = t3.organ_code AND t3.status=0 AND t3.del_flag != 2
WHERE t1.statistics_time > DATE_ADD(CURRENT_DATE,INTERVAL -5 DAY) AND t1.type = #{type}
AND t1.organ_code = #{organCode} and t2.resource_code = #{resourceCode}
AND t1.organ_code = #{organCode} and t2.resource_code = #{resourceCode} and t1.del_flag != 2
group by t1.statistics_time
order by t1.statistics_time asc
</select>

Loading…
Cancel
Save