mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-23 07:31:51 +08:00
新增待办过期和历史归档任务
This commit is contained in:
@@ -287,4 +287,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<update id="expireDueTasks">
|
||||
update sys_todo_task
|
||||
set task_status = 'EXPIRED',
|
||||
completed_time = #{now},
|
||||
active_idempotent_key = null,
|
||||
update_by = #{updateBy},
|
||||
update_time = #{now}
|
||||
where task_status in ('PENDING', 'PROCESSING')
|
||||
and due_time is not null
|
||||
and due_time <= #{now}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<update id="archiveTerminalTasks">
|
||||
update sys_todo_task
|
||||
set del_flag = '2',
|
||||
active_idempotent_key = null,
|
||||
update_by = #{updateBy},
|
||||
update_time = sysdate()
|
||||
where task_status in ('COMPLETED', 'CANCELLED', 'EXPIRED')
|
||||
and coalesce(completed_time, update_time, create_time) < #{archiveBefore}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user