Преглед изворни кода

[营销分析][添加][卡营销列表]

release_toaliyun_real
luozukai пре 7 година
родитељ
комит
55919a8c1b
2 измењених фајлова са 19 додато и 17 уклоњено
  1. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  2. +16
    -16
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 3
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java Прегледај датотеку

@@ -1471,7 +1471,9 @@ public class WxChartServiceImpl implements WxChartDataService {
//卡营销数据
if (chart.equals(EnumChart.SALE_CARD.getCode())) {
WxCoupon wxCoupon = new WxCoupon();
wxCoupon.setTitle(paramsMap.get("title"));
if(StringUtils.isNotBlank(paramsMap.get("id"))) {
wxCoupon.setId(Long.parseLong(paramsMap.get("id")));
}

//默认时间本月第一天,截止到当天
Map<String,Object> result = new HashedMap();


+ 16
- 16
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Прегледај датотеку

@@ -666,8 +666,8 @@
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(ci.sale_amount) sale_amount from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id
where ci.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
group by xtime
</select>
@@ -677,8 +677,8 @@
left join wx_coupon c on c.id = ci.coupon_id
left join wx_card_spend wcs on wcs.card_id = ci.id
where ci.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
group by xtime
</select>
@@ -689,8 +689,8 @@
left join wx_coupon c on c.id = ci.coupon_id
left join wx_coupon_order co on co.id = ci.id
where c.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
</select>

@@ -699,16 +699,16 @@
left join wx_coupon c on c.id = ci.coupon_id
left join wx_card_transfer_info wcs on wcs.coupon_order_id = ci.id
where c.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
</select>

<select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long">
select sum(subsidy_num) from wx_coupon c
where c.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
</select>

@@ -727,8 +727,8 @@
left join wx_card_spend wcs on wcs.card_id = ci.id
where wc.id = c.id) as sum_payment
from wx_coupon c where 1=1
<if test=" null != title ">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
order by status asc,create_date desc
</select>
@@ -742,8 +742,8 @@
<if test=" null != type ">
and c.type = #{type}
</if>
<if test=" null != title ">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
order by status asc,create_date desc
</select>
@@ -751,8 +751,8 @@
<select id="findCouponSendCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long">
select sum(subsidy_num) from wx_coupon c
where c.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
<if test="id != null">
and c.id = #{id}
</if>
</select>
</mapper>

Loading…
Откажи
Сачувај