|
|
|
@@ -134,11 +134,23 @@ |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
) as orderSendCount |
|
|
|
) as orderSendCount, |
|
|
|
(select Count(*) from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> |
|
|
|
SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} |
|
|
|
</foreach>) c |
|
|
|
where DATE_FORMAT(create_time,'%m/%d')=xTime |
|
|
|
and c.channel_type=7 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
) as merchantSendCount |
|
|
|
from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> |
|
|
|
SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} |
|
|
|
</foreach>) wx_coupon_action_log |
|
|
|
where channel_type in (2,3,4,5) |
|
|
|
where channel_type in (2,3,4,5,7) |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
@@ -154,7 +166,7 @@ |
|
|
|
<select id="getSceneDataMap" resultType="com.iformall.domain.vo.MarkingSceneDataReportTVo" parameterType="hashmap"> |
|
|
|
select create_time_md as xTime, channel_type, count(create_time_md + '' + channel_type) as count |
|
|
|
from wx_coupon_action_log |
|
|
|
where channel_type in (2,3,4,5) |
|
|
|
where channel_type in (2,3,4,5,7) |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
and create_time >= #{startTime} |
|
|
|
and create_time <= #{endTime} |
|
|
|
@@ -240,8 +252,7 @@ |
|
|
|
|
|
|
|
<select id="getCountByDateLimit" resultType="java.lang.Integer"> |
|
|
|
select COUNT(*) FROM wx_coupon_action_log |
|
|
|
where `channel_type` != 0 |
|
|
|
and `channel_type` != 1 |
|
|
|
where channel_type in (2,3,4,5,7) |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
and `create_time` >= #{startTime} |
|
|
|
and `create_time` <= #{endTime} |
|
|
|
|