diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java index c9365afce..6fc4bf8d9 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/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 result = new HashedMap(); diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 10e2b0ee1..600c9d2b6 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/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} - - and c.title like concat('%', #{title},'%') + + and c.id = #{id} group by xtime @@ -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} - - and c.title like concat('%', #{title},'%') + + and c.id = #{id} group by xtime @@ -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} - - and c.title like concat('%', #{title},'%') + + and c.id = #{id} @@ -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} - - and c.title like concat('%', #{title},'%') + + and c.id = #{id} @@ -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 - - and c.title like concat('%', #{title},'%') + + and c.id = #{id} order by status asc,create_date desc @@ -742,8 +742,8 @@ and c.type = #{type} - - and c.title like concat('%', #{title},'%') + + and c.id = #{id} order by status asc,create_date desc @@ -751,8 +751,8 @@