xhxu 5 лет назад
Родитель
Сommit
84c96befd9
2 измененных файлов: 9 добавлений и 7 удалений
  1. +2
    -0
      mallinkAdmin/src/main/resources/db/migration/V202105270001__tt_add_.sql
  2. +7
    -7
      mallinkService/src/main/resources/mapper/TtCouponMapper.xml

+ 2
- 0
mallinkAdmin/src/main/resources/db/migration/V202105270001__tt_add_.sql Просмотреть файл

@@ -0,0 +1,2 @@
ALTER TABLE `wx_merchant`
ADD COLUMN `business_types` json AFTER `business_id`;

+ 7
- 7
mallinkService/src/main/resources/mapper/TtCouponMapper.xml Просмотреть файл

@@ -147,31 +147,31 @@
</delete>

<update id="addSeeCount" parameterType="Long">
update tt_coupon SET see_count = see_count+1,popularity = popularity+1, update_date=now() where id = #{id}
update tt_coupon SET see_count = see_count+1,popularity = popularity+1 where id = #{id}
</update>

<update id="addSellCount" parameterType="Long">
update tt_coupon SET sell_count = sell_count+1,popularity = popularity+20, false_sell_count = false_sell_count+1, update_date=now() where id = #{id}
update tt_coupon SET sell_count = sell_count+1,popularity = popularity+20, false_sell_count = false_sell_count+1 where id = #{id}
</update>

<update id="reduceSellCount" parameterType="Long">
update tt_coupon SET sell_count = sell_count-1,popularity = popularity-20, false_sell_count = false_sell_count-1, update_date=now() where id = #{id}
update tt_coupon SET sell_count = sell_count-1,popularity = popularity-20, false_sell_count = false_sell_count-1 where id = #{id}
</update>

<update id="addAssessCount" parameterType="Long">
update tt_coupon SET assess_count = assess_count+1,popularity = popularity+10, update_date=now() where id = #{id}
update tt_coupon SET assess_count = assess_count+1,popularity = popularity+10 where id = #{id}
</update>

<update id="addCollectCount" parameterType="Long">
update tt_coupon SET collect_count = collect_count+1,popularity = popularity+5, update_date=now() where id = #{id}
update tt_coupon SET collect_count = collect_count+1,popularity = popularity+5 where id = #{id}
</update>

<update id="reduceCollectCount" parameterType="Long">
update tt_coupon SET collect_count = collect_count-1,popularity = popularity-5, update_date=now() where id = #{id}
update tt_coupon SET collect_count = collect_count-1,popularity = popularity-5 where id = #{id}
</update>

<update id="addPopularity" parameterType="java.util.HashMap">
update tt_coupon SET popularity = popularity+#{popularity}, update_date=now() where id = #{id}
update tt_coupon SET popularity = popularity+#{popularity} where id = #{id}
</update>

</mapper>

Загрузка…
Отмена
Сохранить