2023-12-12 22:20:30 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2024-04-16 15:03:26 +08:00
|
|
|
<mapper namespace="com.aizuda.snailjob.template.datasource.persistence.mapper.WorkflowMapper">
|
2023-12-12 22:20:30 +08:00
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
2024-04-16 15:03:26 +08:00
|
|
|
<resultMap id="BaseResultMap" type="com.aizuda.snailjob.template.datasource.persistence.po.Workflow">
|
2024-05-15 22:59:03 +08:00
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="namespace_id" property="namespaceId"/>
|
|
|
|
<result column="group_name" property="groupName"/>
|
|
|
|
<result column="workflow_status" property="workflowStatus"/>
|
|
|
|
<result column="next_trigger_at" property="nextTriggerAt"/>
|
|
|
|
<result column="flow_info" property="flowInfo"/>
|
|
|
|
<result column="create_dt" property="createDt"/>
|
|
|
|
<result column="update_dt" property="updateDt"/>
|
|
|
|
<result column="deleted" property="deleted"/>
|
|
|
|
<result column="ext_attrs" property="extAttrs"/>
|
2023-12-12 22:20:30 +08:00
|
|
|
</resultMap>
|
2024-03-29 13:37:55 +08:00
|
|
|
|
2023-12-21 22:58:17 +08:00
|
|
|
<update id="updateBatchNextTriggerAtById" parameterType="java.util.List">
|
2024-04-16 09:08:34 +08:00
|
|
|
UPDATE sj_workflow rt,
|
2024-05-15 22:59:03 +08:00
|
|
|
(
|
|
|
|
<foreach collection="list" item="item" index="index" separator="UNION ALL">
|
|
|
|
SELECT
|
|
|
|
#{item.nextTriggerAt} AS next_trigger_at,
|
|
|
|
#{item.id} AS id
|
|
|
|
</foreach>
|
|
|
|
) tt
|
|
|
|
SET rt.next_trigger_at = tt.next_trigger_at
|
|
|
|
WHERE rt.id = tt.id
|
2023-12-21 22:58:17 +08:00
|
|
|
</update>
|
|
|
|
|
2023-12-12 22:20:30 +08:00
|
|
|
</mapper>
|