gtsoft-snail-job-server/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/WorkflowMapper.xml
dhb52 a36a62a4d0 !62 fix: Dashboard对应mapper函数少参数,用于条件判断
* style: 格式化mysql的SQL文件
* style: 格式化mysql的mapper.xml文件
* fix: Dashboard对应mapper函数少参数,用于条件判断
* fix: `job_summary`表缺`system_task_type`字段
2024-03-29 05:37:55 +00:00

33 lines
1.5 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 rt,
(
<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
</update>
</mapper>