DELETE FROM where batch_id in (select id from atu_plan_batch where plan_id = #{planId}) LIMIT #{num} UPDATE SET `status` = #{timeoutStatus,jdbcType=VARCHAR} WHERE batch_id = #{batchId,jdbcType=VARCHAR} AND (`status` = #{waitStatus, jdbcType=VARCHAR} or `status` = #{timeoutStatus, jdbcType=VARCHAR})