From 0f9064331d69dbf88cb5d6d9aaac9be84a670d87 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sat, 5 Jan 2019 18:33:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BA=A4=E6=98=93=E5=AF=B9=E8=B4=A6=E5=8D=95]?= =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxOrderMapper.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index 41ca18f0e..2917a3be5 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -427,7 +427,7 @@ o.order_status,o.create_date,o.update_date,o.detail,'[多商户交易]' merchant_name,cubi.`name` c_user_name,cubi.phone from ( - select o.* from wx_order o where o.type in (0,3) and o.id in( + select o.* from wx_order o where o.type=0 and o.id in( select o.id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id group by o.id having count(o.id)>1)) o left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id @@ -436,7 +436,7 @@ o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone from( select o.*,cm.merchant_id from ( - select o.* from wx_order o where o.type in (0,3) and o.id not in( + select o.* from wx_order o where o.type=0 and o.id not in( select o.id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id group by o.id having count(o.id)>1) ) o @@ -447,6 +447,12 @@ where type in (1,2))o left join wx_merchant m on o.merchant_id=m.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id + union all + select o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, + o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone + from wx_order o left join wx_merchant m on o.product_id=m.id + left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id + where o.type=3 ) o