From 344da899c19ce1112a2b75806355aff7f81eb5a6 Mon Sep 17 00:00:00 2001 From: hupeng Date: Sat, 26 Jan 2019 14:59:08 +0800 Subject: [PATCH] =?UTF-8?q?[BUG][=E4=BF=AE=E5=A4=8D]:=E5=A4=9A=E5=95=86?= =?UTF-8?q?=E6=88=B7=E9=80=9A=E7=94=A8=E5=88=B8=E4=B8=AD=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=95=86=E6=88=B7=E8=A2=AB=E7=A6=81=E7=94=A8=E6=97=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/WxCouponOrderMapper.xml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index 5660b8578..8d28e9021 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -297,7 +297,7 @@ c.title,c.sale_price,c.use_price,c.price,c.unit, (case when com.mc=1 then (select m.name from wx_merchant m, wx_coupon_merchant cm - where m.id = cm.merchant_id and cm.product_id=co.coupon_id) else '[多商户通用]' end) as merchant_name + where m.id = cm.merchant_id and cm.product_id=co.coupon_id and m.status = 1) else '[多商户通用]' end) as merchant_name @@ -315,9 +315,9 @@ wx_coupon c, (select tco.id as tcoid, (select count(*) from wx_coupon_merchant tcm - where tcm.product_id = tco.coupon_id - and tcm.status = 0) as mc - from wx_coupon_order tco) com + where tcm.product_id = tco.coupon_id + and tcm.status = 0) as mc + from wx_coupon_order tco) com where com.tcoid = co.id and co.coupon_type < 100 and c.id = co.coupon_id @@ -330,10 +330,14 @@ - and (case when com.mc=1 then - (select m.name from wx_merchant m, wx_coupon_merchant cm - where m.id = cm.merchant_id and cm.product_id=co.coupon_id) else '[多商户通用]' end) - like concat('%', #{merchantName},'%') + and (case when com.mc=1 + then + (select m.name from wx_merchant m, wx_coupon_merchant cm + where m.id = cm.merchant_id + and cm.product_id=co.coupon_id + and m.status = 1) + else'[多商户通用]' end) + like concat('%', #{merchantName},'%')