Browse Source

//场景

release_toaliyun_real
xhxu 3 years ago
parent
commit
d8e08eaf65
3 changed files with 23 additions and 8 deletions
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/MarkingSceneDataReportVo.java
  2. +6
    -3
      mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java
  3. +16
    -5
      mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml

+ 1
- 0
mallinkService/src/main/java/com/iformall/domain/vo/MarkingSceneDataReportVo.java View File

@@ -13,6 +13,7 @@ public class MarkingSceneDataReportVo {
private int verifySendCount; // 核销发放 private int verifySendCount; // 核销发放
private int microPaySendCount; // B端刷卡支付发放 private int microPaySendCount; // B端刷卡支付发放
private int orderSendCount; // 购买发放数 private int orderSendCount; // 购买发放数
private int merchantSendCount; // 商户发放数
private int parkCount; // 停车核销数 private int parkCount; // 停车核销数
private int verifyCount; // 核销核销数 private int verifyCount; // 核销核销数
private int microPayCount; // 核销核销数 private int microPayCount; // 核销核销数


+ 6
- 3
mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java View File

@@ -188,7 +188,7 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
//处理数据 //处理数据
wxCouponActionLogService.updateCreateTimeMd(tenantEntity); wxCouponActionLogService.updateCreateTimeMd(tenantEntity);


Map<String,Integer> sceneMap = wxCouponActionLogService.getSceneDataMap(tenantEntity,addDay(-30),addDay(1));
Map<String,Integer> sceneMap = wxCouponActionLogService.getSceneDataMap(tenantEntity,addDay(-30),addDay(1));//2,3,4,5,7


String startdate = DateUtils.getTimeBefore(30, new Date()); String startdate = DateUtils.getTimeBefore(30, new Date());
String enddate = DateUtils.getTimeBefore(1,new Date()); String enddate = DateUtils.getTimeBefore(1,new Date());
@@ -206,12 +206,15 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
Integer count4 = sceneMap.get(tj + "_" + EnumCouponSendSendType.B_MICROPAY.getCode()); Integer count4 = sceneMap.get(tj + "_" + EnumCouponSendSendType.B_MICROPAY.getCode());
msdVo.setMicroPaySendCount(count4==null?0:count4); msdVo.setMicroPaySendCount(count4==null?0:count4);
Integer count5 = sceneMap.get(tj + "_" + EnumCouponSendSendType.C_ORDER.getCode()); Integer count5 = sceneMap.get(tj + "_" + EnumCouponSendSendType.C_ORDER.getCode());
msdVo.setMicroPaySendCount(count5==null?0:count5);
msdVo.setOrderSendCount(count5==null?0:count5);
Integer count6 = sceneMap.get(tj + "_" + EnumCouponSendSendType.MERCHANT.getCode());
msdVo.setMerchantSendCount(count6==null?0:count6);


msdVo.setTotal(msdVo.getParkSendCount() + msdVo.setTotal(msdVo.getParkSendCount() +
msdVo.getVerifySendCount() + msdVo.getVerifySendCount() +
msdVo.getMicroPaySendCount() + msdVo.getMicroPaySendCount() +
msdVo.getOrderSendCount());
msdVo.getOrderSendCount() +
msdVo.getMerchantSendCount());


tempDatalist.add(msdVo); tempDatalist.add(msdVo);
} }


+ 16
- 5
mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml View File

@@ -134,11 +134,23 @@
<if test=" null != parentTenantId and '' != parentTenantId"> <if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId} and `parent_tenant_id` = #{parentTenantId}
</if> </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"> from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix}
</foreach>) wx_coupon_action_log </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"> <if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId} and `tenant_id` = #{tenantId}
</if> </if>
@@ -154,7 +166,7 @@
<select id="getSceneDataMap" resultType="com.iformall.domain.vo.MarkingSceneDataReportTVo" parameterType="hashmap"> <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 select create_time_md as xTime, channel_type, count(create_time_md + '' + channel_type) as count
from wx_coupon_action_log 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 `tenant_id` = #{tenantId}
and create_time &gt;= #{startTime} and create_time &gt;= #{startTime}
and create_time &lt;= #{endTime} and create_time &lt;= #{endTime}
@@ -240,8 +252,7 @@


<select id="getCountByDateLimit" resultType="java.lang.Integer"> <select id="getCountByDateLimit" resultType="java.lang.Integer">
select COUNT(*) FROM wx_coupon_action_log 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 `tenant_id` = #{tenantId}
and `create_time` &gt;= #{startTime} and `create_time` &gt;= #{startTime}
and `create_time` &lt;= #{endTime} and `create_time` &lt;= #{endTime}


Loading…
Cancel
Save