|
|
|
@@ -510,30 +510,24 @@ |
|
|
|
mb.building_name,mf.floor_name |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="listCUserColumns"> |
|
|
|
c.id,c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.remain_inventory,c.inventory,c.business, |
|
|
|
m.name |
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDetailForCUser" parameterType="com.simple.domain.po.WxCoupon" resultMap="CUserResultMap"> |
|
|
|
<select id="selectDetailForCUser" parameterType="com.simple.domain.po.WxCouponChannel" resultMap="CUserResultMap"> |
|
|
|
select <include refid="allCUserColumns" /> |
|
|
|
from wx_coupon c,wx_merchant m, |
|
|
|
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 |
|
|
|
where c.merchant_id = m.id |
|
|
|
<if test=" null != id "> |
|
|
|
and c.id = #{id} |
|
|
|
<if test=" null != couponId "> |
|
|
|
and c.id = #{couponId} |
|
|
|
and cc.coupon_id = #{couponId} |
|
|
|
</if> |
|
|
|
<if test=" null != tenantId "> |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != business "> |
|
|
|
and c.business like concat('%', #{business},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != type "> |
|
|
|
and c.type = #{type} |
|
|
|
<if test=" null != targetAd "> |
|
|
|
and cc.target_ad = #{targetAd} |
|
|
|
</if> |
|
|
|
and ms.merchant_id = m.id |
|
|
|
and ms.shop_id = s.id |
|
|
|
|