2023-11-13 00:02:36 +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.JobMapper">
|
2023-11-13 00:02:36 +08:00
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
2024-04-16 15:03:26 +08:00
|
|
|
<resultMap id="BaseResultMap" type="com.aizuda.snailjob.template.datasource.persistence.po.Job">
|
2023-11-13 00:02:36 +08:00
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="group_name" property="groupName"/>
|
|
|
|
<result column="job_name" property="jobName"/>
|
|
|
|
<result column="args_str" property="argsStr"/>
|
|
|
|
<result column="args_type" property="argsType"/>
|
|
|
|
<result column="ext_attrs" property="extAttrs"/>
|
|
|
|
<result column="next_trigger_at" property="nextTriggerAt"/>
|
|
|
|
<result column="job_status" property="jobStatus"/>
|
|
|
|
<result column="route_key" property="routeKey"/>
|
|
|
|
<result column="executor_type" property="executorType"/>
|
|
|
|
<result column="executor_info" property="executorInfo"/>
|
|
|
|
<result column="block_strategy" property="blockStrategy"/>
|
|
|
|
<result column="executor_timeout" property="executorTimeout"/>
|
|
|
|
<result column="max_retry_times" property="maxRetryTimes"/>
|
|
|
|
<result column="retry_interval" property="retryInterval"/>
|
|
|
|
<result column="bucket_index" property="bucketIndex"/>
|
|
|
|
<result column="description" property="description"/>
|
|
|
|
<result column="create_dt" property="createDt"/>
|
|
|
|
<result column="update_dt" property="updateDt"/>
|
|
|
|
<result column="deleted" property="deleted"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<update id="updateBatchNextTriggerAtById" parameterType="java.util.List">
|
2024-05-14 00:14:47 +08:00
|
|
|
UPDATE sj_job 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
|
2024-04-01 08:46:24 +08:00
|
|
|
SET rt.next_trigger_at = tt.next_trigger_at
|
|
|
|
WHERE rt.id = tt.id
|
2023-11-13 00:02:36 +08:00
|
|
|
</update>
|
|
|
|
|
|
|
|
</mapper>
|