|
|
|
@@ -213,7 +213,7 @@ |
|
|
|
m.img_url,m.name,m.link_phone,m.status, |
|
|
|
s.addr,s.shop_number,s.baidu_poi, |
|
|
|
mb.building_name,mf.floor_name, |
|
|
|
cc.id,cc.coupon_id,cc.begin_time,cc.end_time |
|
|
|
cc.id,cc.coupon_id,cc.target_ad,cc.begin_time,cc.end_time |
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
@@ -243,31 +243,6 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<sql id="allCUserColumns2"> |
|
|
|
c.tenant_id,c.merchant_id,c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.use_limit_quantity,c.target_ad,c.send_type,c.valid_type,c.valid_start_date,c.valid_end_date,c.valid_days,c.detail,c.price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status,c.create_date,c.update_date,c.business, |
|
|
|
m.img_url,m.name,m.link_phone,m.status, |
|
|
|
s.addr,s.shop_number,s.baidu_poi, |
|
|
|
mb.building_name,mf.floor_name |
|
|
|
</sql> |
|
|
|
<select id="selectDetailForCUserC" parameterType="com.iformall.domain.po.WxCoupon" resultMap="CUserResultMap"> |
|
|
|
select |
|
|
|
<include refid="allCUserColumns2"/> |
|
|
|
from |
|
|
|
wx_coupon c,wx_merchant m |
|
|
|
left join wx_merchant_shop ms on ms.merchant_id = m.id and ms.is_del = 0 |
|
|
|
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 |
|
|
|
<if test=" null != id "> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
<if test=" null != tenantId "> |
|
|
|
and c.tenant_id = #{tenantId} |
|
|
|
</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="reduceInventory"> |
|
|
|
update wx_coupon SET remain_inventory = remain_inventory - #{number} where id = #{id} and remain_inventory>= #{number} |
|
|
|
</update> |
|
|
|
|