diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index a1db4c92c..e1901b3fa 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -657,7 +657,7 @@ from wx_merchant_b_user bu inner join wx_merchant m on bu.merchant_id=m.id where bu.tenant_id = #{tenantId} ) bu on bu.bu_id = co.b_user_id - left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id + left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id and ms.type = 1 left join wx_coupon_action_log cal on co.id = cal.coupon_order_id and co.coupon_id = cal.coupon_id where 1=1 @@ -742,7 +742,7 @@ left join wx_c_user cu on cu.id = co.c_user_id left join wx_merchant_b_user bu on co.b_user_id = bu.id left join wx_merchant m on m.id = bu.merchant_id - left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id + left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id and ms.type = 1 where co.id = #{id} and c.id = co.coupon_id