Browse Source

[商户会员消费列表][修改][查询及详情]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
14c144140a
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 4
- 4
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml View File

@@ -429,11 +429,11 @@
ifnull(consume.consumeCount,0) consumeCount,ifnull(consume.consumeCountP,0) as consumeCountP,
ifnull(consume.tradeAmt,0) tradeAmt
FROM wx_merchant m
left join (select count(co.c_user_id) AS consumeCount,
count(DISTINCT co.c_user_id) AS consumeCountP,sum(co.coupon_price) AS tradeAmt, m.id as merchant_id from
left join (select count(co.c_user_id) AS consumeCountP,
count(DISTINCT co.c_user_id) AS consumeCount,sum(co.coupon_price) AS tradeAmt, m.id as merchant_id from
wx_coupon_order co
left join (select m.id,mbu.id as b_user_id from wx_merchant m
left join wx_merchant_b_user mbu on m.id=mbu.merchant_id) m
left join wx_merchant_b_user mbu on m.id=mbu.merchant_id where status=0) m
on co.b_user_id=m.b_user_id
WHERE co.coupon_order_status = 1
<if test="tenantId != null">
@@ -471,7 +471,7 @@
and o.tenant_id=#{tenantId}
<if test=" null != id ">
and o.b_user_id in(
select id from wx_merchant_b_user where merchant_id=#{id}
select id from wx_merchant_b_user where status=0 and merchant_id=#{id}
)
</if>



Loading…
Cancel
Save