|
|
|
@@ -257,8 +257,16 @@ |
|
|
|
<select id="findListOfCUser" parameterType="map" resultMap="CVoResultMap"> |
|
|
|
select <include refid="allCUserCouponOrderListColumns" /> |
|
|
|
from wx_coupon_order c,wx_coupon co,wx_merchant m |
|
|
|
where c.c_user_id = #{cUserId} |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
where 1=1 |
|
|
|
<if test="cUserId != null"> |
|
|
|
and c.c_user_id = #{cUserId} |
|
|
|
</if> |
|
|
|
<if test="merchantId != null"> |
|
|
|
and co.merchant_id = #{merchantId} |
|
|
|
</if> |
|
|
|
<if test="tenantId != null"> |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
</if> |
|
|
|
and c.coupon_id = co.id |
|
|
|
and co.merchant_id = m.id |
|
|
|
<if test="status != null"> |
|
|
|
@@ -272,10 +280,20 @@ |
|
|
|
wx_shop s,wx_merchant_shop ms, |
|
|
|
wx_mall_building mb, |
|
|
|
wx_mall_floor mf |
|
|
|
where c.c_user_id = #{cUserId} |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
where 1=1 |
|
|
|
<if test="cUserId != null"> |
|
|
|
and c.c_user_id = #{cUserId} |
|
|
|
</if> |
|
|
|
<if test="merchantId != null"> |
|
|
|
and co.merchant_id = #{merchantId} |
|
|
|
</if> |
|
|
|
<if test="tenantId != null"> |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test="couponOrderId != null"> |
|
|
|
and c.id = #{couponOrderId} |
|
|
|
</if> |
|
|
|
and c.coupon_id = co.id |
|
|
|
and c.id = #{couponOrderId} |
|
|
|
and co.merchant_id = m.id |
|
|
|
and ms.merchant_id = m.id |
|
|
|
and ms.shop_id = s.id |
|
|
|
|