|
|
|
@@ -519,13 +519,13 @@ |
|
|
|
select o.*, m.`name` merchantName from ( |
|
|
|
select o.*,cm.merchant_id from wx_order o |
|
|
|
left join wx_coupon_merchant cm on o.product_id=cm.product_id |
|
|
|
where o.type in (0,3) and o.order_status = 1) o1 |
|
|
|
where o.type in (0,3) and o.order_status = 1) o |
|
|
|
left join wx_merchant m on o.merchant_id=m.id |
|
|
|
union all |
|
|
|
select o.*,m.`name` merchantName from ( |
|
|
|
select o.*,mbu.merchant_id from wx_order o |
|
|
|
left join wx_merchant_b_user mbu on o.product_id=mbu.id |
|
|
|
where o.type in (1,2) and o.order_status = 1) o1 |
|
|
|
where o.type in (1,2) and o.order_status = 1) o |
|
|
|
left join wx_merchant m on o.merchant_id=m.id |
|
|
|
) o |
|
|
|
<where> |
|
|
|
@@ -544,13 +544,13 @@ |
|
|
|
select o.*,m.`name` merchantName from ( |
|
|
|
select o.*,cm.merchant_id from wx_order o |
|
|
|
left join wx_coupon_merchant cm on o.product_id=cm.product_id |
|
|
|
where o.type in (0,3) and o.order_status = 1) o1 |
|
|
|
where o.type in (0,3) and o.order_status = 1) o |
|
|
|
left join wx_merchant m on o.merchant_id=m.id |
|
|
|
union all |
|
|
|
select o.*,m.`name` merchantName from ( |
|
|
|
select o.*,mbu.merchant_id from wx_order o |
|
|
|
left join wx_merchant_b_user mbu on o.product_id=mbu.id |
|
|
|
where o.type in (1,2) and o.order_status = 1) o1 |
|
|
|
where o.type in (1,2) and o.order_status = 1) o |
|
|
|
left join wx_merchant m on o.merchant_id=m.id |
|
|
|
) o |
|
|
|
<where> |
|
|
|
|