如果归集任务下面的子项都取消了,归集任务可以直接关闭
This commit is contained in:
1 parent
62f43056e2
commit
c94f0f14d2
7 files changed
+74
-12
No files matched your search
@@ -3,6 +3,20 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UsdtAggregationTaskMapper">
|
||||
<update id="closeIfAllItemsCancelled">
|
||||
update usdt_aggregation_task set status = 4, remark = '全部归集明细已取消,任务已关闭', updated_at = current_timestamp
|
||||
where id = #{id} and deleted_at is null and status in (0, 1, 3)
|
||||
and exists (select 1 from usdt_aggregation_task_item where parent_id = #{id} and deleted_at is null)
|
||||
and not exists (select 1 from usdt_aggregation_task_item where parent_id = #{id} and deleted_at is null and (status is null or status != 3))
|
||||
</update>
|
||||
<update id="startExecutableTask">
|
||||
update usdt_aggregation_task set status = 1, exe_time = current_timestamp, updated_at = current_timestamp
|
||||
where id = #{id} and deleted_at is null and verify_status = 1 and status in (0, 3)
|
||||
</update>
|
||||
<update id="finishExecutableTask">
|
||||
update usdt_aggregation_task set status = #{status}, remark = #{remark}, updated_at = current_timestamp
|
||||
where id = #{id} and deleted_at is null and status != 4
|
||||
</update>
|
||||
|
||||
<resultMap type="UsdtAggregationTask" id="UsdtAggregationTaskResult">
|
||||
<result property="id" column="id" />
|
||||
|
||||
Reference in new issue
Block a user