ZfbShopOrderDayLimitMapper.xml 963 B

12345678910111213141516
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.cyksj.mapper.ZfbShopOrderDayLimitMapper">
  4. <update id="decrRemainOrdersById">
  5. update zfb_shop_order_day_limit set day_remain_orders = day_remain_orders - 1,hour_remain_orders = hour_remain_orders - 1 where id = #{id} and day_remain_orders > 0 and hour_remain_orders > 0
  6. </update>
  7. <update id="incrDayLimitRemainOrders">
  8. update zfb_shop_order_day_limit set day_remain_orders = day_remain_orders + 1 where app_id = #{shopId} and day_remain_orders >= 0 and day_remain_orders &lt; day_limit_orders;
  9. </update>
  10. <update id="incrHourLimitRemainOrders">
  11. update zfb_shop_order_day_limit set hour_remain_orders = hour_remain_orders + 1 where app_id = #{shopId} and hour_remain_orders >= 0 and hour_remain_orders &lt; hour_limit_orders;
  12. </update>
  13. </mapper>