gtsoft-snail-job-server/easy-retry-datasource/easy-retry-postgres-datasource/src/main/resources/postgres/mapper/WorkflowMapper.xml
byteblogs168 341f643765 feat: 2.6.0
1. 工作流执行pg、mariadb数据库
2024-01-31 22:01:58 +08:00

33 lines
1.4 KiB
XML

<?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">
<mapper namespace="com.aizuda.easy.retry.template.datasource.persistence.mapper.WorkflowMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.aizuda.easy.retry.template.datasource.persistence.po.Workflow">
<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" />
</resultMap>
<update id="updateBatchNextTriggerAtById" parameterType="java.util.List">
UPDATE workflow AS rt
SET next_trigger_at = tt.next_trigger_at
FROM (
<foreach collection="list" item="item" index="index" separator=" union all ">
select
#{item.nextTriggerAt} as next_trigger_at,
#{item.id} as id
</foreach>
) AS tt
WHERE rt.id = tt.id
</update>
</mapper>