From 55919a8c1b5b1e9f479f3dffdc5bfc5f23f0088c Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 15 Mar 2019 15:50:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E8=90=A5=E9=94=80=E5=88=86=E6=9E=90][?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0][=E5=8D=A1=E8=90=A5=E9=94=80=E5=88=97?= =?UTF-8?q?=E8=A1=A8]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxChartServiceImpl.java | 4 ++- .../main/resources/mapper/WxCouponMapper.xml | 32 +++++++++---------- 2 files changed, 19 insertions(+), 17 deletions(-) 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 @@