gtsoft-snail-job-server/snail-job-datasource/snail-job-sqlserver-datasource/src/main/resources/sqlserver/mapper/RetryDeadLetterMapper.xml

46 lines
2.4 KiB
XML
Raw Normal View History

<?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.RetryDeadLetterMapper">
<resultMap id="BaseResultMap" type="com.aizuda.snailjob.template.datasource.persistence.po.RetryDeadLetter">
2024-05-15 22:59:03 +08:00
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="namespace_id" jdbcType="VARCHAR" property="namespaceId"/>
<result column="unique_id" jdbcType="VARCHAR" property="uniqueId"/>
2024-05-15 22:59:03 +08:00
<result column="group_name" jdbcType="VARCHAR" property="groupName"/>
<result column="scene_name" jdbcType="VARCHAR" property="sceneName"/>
<result column="idempotent_id" jdbcType="VARCHAR" property="idempotentId"/>
<result column="biz_no" jdbcType="VARCHAR" property="bizNo"/>
<result column="executor_name" jdbcType="VARCHAR" property="executorName"/>
<result column="args_str" jdbcType="VARCHAR" property="argsStr"/>
<result column="ext_attrs" jdbcType="VARCHAR" property="extAttrs"/>
<result column="task_type" jdbcType="TINYINT" property="taskType"/>
2024-05-15 22:59:03 +08:00
<result column="create_dt" jdbcType="TIMESTAMP" property="createDt"/>
</resultMap>
<sql id="Base_Column_List">
2024-05-15 22:59:03 +08:00
id, unique_id, group_name, scene_name, idempotent_id, biz_no, executor_name, args_str, ext_attrs, create_dt,
task_type
</sql>
<insert id="insertBatch">
2024-05-13 23:51:42 +08:00
INSERT INTO sj_retry_dead_letter (namespace_id, unique_id, group_name, scene_name,
2024-05-15 22:59:03 +08:00
idempotent_id, biz_no, executor_name, args_str,
ext_attrs, create_dt)
values
2024-05-15 22:59:03 +08:00
<foreach collection="retryDeadLetters" item="retryDeadLetter" separator=",">
(
#{retryDeadLetter.namespaceId,jdbcType=VARCHAR},
#{retryDeadLetter.uniqueId,jdbcType=VARCHAR},
#{retryDeadLetter.groupName,jdbcType=VARCHAR},
#{retryDeadLetter.sceneName,jdbcType=VARCHAR},
#{retryDeadLetter.idempotentId,jdbcType=VARCHAR},
#{retryDeadLetter.bizNo,jdbcType=VARCHAR},
#{retryDeadLetter.executorName,jdbcType=VARCHAR},
#{retryDeadLetter.argsStr,jdbcType=VARCHAR},
#{retryDeadLetter.extAttrs,jdbcType=VARCHAR},
#{retryDeadLetter.createDt,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
</mapper>