|
|
|
@@ -641,6 +641,20 @@ |
|
|
|
<if test=" null == sortColumns"> order by c.status asc,c.create_date desc </if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertPressData" parameterType="com.iformall.domain.po.WxCoupon" > |
|
|
|
insert into `wx_coupon_press_data` |
|
|
|
(`id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price`) |
|
|
|
select `id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price` |
|
|
|
from wx_coupon where type = 8 and tenant_id = #{tenantId} and id = #{id} |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updatePressData0" parameterType="com.iformall.domain.po.WxCoupon" > |
|
|
|
update wx_coupon_press_data cpd, wx_coupon c |
|
|
|
set cpd.id=c.id, cpd.`cover_img`=c.`cover_img`, |
|
|
|
cpd.`title`=c.`title`,cpd.c.`sale_price`=,cpd.`price`=c.`price` |
|
|
|
where cpd.tenant_id = #{tenantId} and cpd.`id` = c.`id` and c.type = 8 and c.id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updatePressData1" parameterType="com.iformall.domain.po.WxCoupon" > |
|
|
|
update wx_coupon_press_data cpd set change_rate = |
|
|
|
IFNULL(round((select count(o.id) from wx_order o |
|
|
|
|