xiaoyong931011
2022-11-02 a3243dabdec4b7c730002e98e9300a37f8f9930e
src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml
@@ -12,7 +12,7 @@
    <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
@@ -21,7 +21,7 @@
    <update id="addAvaAmountById">
        update igt_on_hook_plan_order
        set
            ava_amount = ava_amount + #{amount},
            ava_amount = ava_amount + #{amount}
        where
            id = #{id}
    </update>
@@ -81,4 +81,21 @@
        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>