| | |
| | | <update id="updateAvaAmountById"> |
| | | update igt_on_hook_plan_order |
| | | set |
| | | ava_amount = ava_amount - #{amount}, |
| | | ava_amount = ava_amount - #{amount} |
| | | where |
| | | id = #{id} |
| | | and ava_amount - #{amount} <![CDATA[ >= ]]> 0 |
| | |
| | | <update id="addAvaAmountById"> |
| | | update igt_on_hook_plan_order |
| | | set |
| | | ava_amount = ava_amount + #{amount}, |
| | | ava_amount = ava_amount + #{amount} |
| | | where |
| | | id = #{id} |
| | | </update> |
| | |
| | | order by s.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectIdsByState" resultType="java.lang.Long"> |
| | | SELECT |
| | | a.id |
| | | FROM igt_on_hook_plan_order a |
| | | where a.state = #{state} |
| | | </select> |
| | | |
| | | <update id="updateByIds" parameterType="list"> |
| | | update igt_on_hook_plan_order |
| | | set |
| | | state = 2 |
| | | where 1=1 |
| | | <foreach collection="list" item="id"> |
| | | or id = #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | </mapper> |