|
|
|
@@ -518,14 +518,15 @@ |
|
|
|
<select id="selectDetailForCUser" parameterType="com.simple.domain.po.WxCouponChannel" resultMap="CUserResultMap"> |
|
|
|
select <include refid="allCUserColumns" /> |
|
|
|
from wx_coupon_channel cc, |
|
|
|
wx_coupon c,wx_merchant m, |
|
|
|
wx_shop s,wx_merchant_shop ms, |
|
|
|
wx_mall_building mb, |
|
|
|
wx_mall_floor mf |
|
|
|
wx_coupon c,wx_merchant m |
|
|
|
left join wx_merchant_shop ms on ms.merchant_id = m.id |
|
|
|
left join wx_shop s on ms.shop_id = s.id |
|
|
|
left join wx_mall_building mb on s.building = mb.id |
|
|
|
left join wx_mall_floor mf on s.floor = mf.id |
|
|
|
where c.merchant_id = m.id |
|
|
|
and cc.coupon_id = c.id |
|
|
|
<if test=" null != couponId "> |
|
|
|
and c.id = #{couponId} |
|
|
|
and cc.coupon_id = #{couponId} |
|
|
|
</if> |
|
|
|
<if test=" null != tenantId "> |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
@@ -533,10 +534,6 @@ |
|
|
|
<if test=" null != targetAd "> |
|
|
|
and cc.target_ad = #{targetAd} |
|
|
|
</if> |
|
|
|
and ms.merchant_id = m.id |
|
|
|
and ms.shop_id = s.id |
|
|
|
and s.building = mb.id |
|
|
|
and s.floor = mf.id |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|