- * 任务实例 Mapper 接口 + * 调度任务 Mapper 接口 *
* * @author www.byteblogs.com * @since 2023-09-24 */ @Mapper -public interface JobTaskInstanceMapper extends BaseMapper- * 调度任务 Mapper 接口 + * 任务实例 Mapper 接口 *
* * @author www.byteblogs.com diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/GroupConfig.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/GroupConfig.java index 5e35abec..5ed1d502 100644 --- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/GroupConfig.java +++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/GroupConfig.java @@ -27,6 +27,8 @@ public class GroupConfig implements Serializable { private Integer initScene; + private Integer bucketIndex; + private String description; private LocalDateTime createDt; diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/Job.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/Job.java index 852eb7f1..2d13f5ab 100644 --- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/Job.java +++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/Job.java @@ -109,6 +109,16 @@ public class Job implements Serializable { */ private Integer retryInterval; + /** + * 任务类型 + */ + private Integer taskType; + + /** + * 并行数 + */ + private Integer parallelNum; + /** * bucket */ diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobLogMessage.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobLogMessage.java index 0829dda4..972500d2 100644 --- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobLogMessage.java +++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobLogMessage.java @@ -3,8 +3,10 @@ package com.aizuda.easy.retry.template.datasource.persistence.po; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; + import java.io.Serializable; import java.time.LocalDateTime; + import lombok.Getter; import lombok.Setter; @@ -26,7 +28,7 @@ public class JobLogMessage implements Serializable { /** * 主键 */ - @TableId(value = "id", type = IdType.AUTO) + @TableId(value = "id", type = IdType.AUTO) private Long id; /** @@ -42,18 +44,23 @@ public class JobLogMessage implements Serializable { /** * 任务实例id */ - private Long taskId; + private Long taskBatchId; /** * 调度任务id */ - private Long taskInstanceId; + private Long taskId; /** * 创建时间 */ private LocalDateTime createDt; + /** + * 客户端信息 + */ + private String clientAddress; + /** * 调度信息 */ diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTask.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTask.java index b469ec21..ada7dc80 100644 --- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTask.java +++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTask.java @@ -12,7 +12,7 @@ import lombok.Setter; /** *- * 调度任务 + * 任务实例 *
* * @author www.byteblogs.com @@ -37,24 +37,54 @@ public class JobTask implements Serializable { private String groupName; /** - * 任务id + * 任务信息id */ private Long jobId; + /** + * 调度任务id + */ + private Long taskBatchId; + + /** + * 父执行器id + */ + private Long parentId; + + /** + * 执行的状态 0、失败 1、成功 + */ + private Integer executeStatus; + /** * 重试次数 */ private Integer retryCount; /** - * 任务状态 0、失败 1、成功 + * 执行结果 */ - private Integer taskStatus; + private String resultMessage; /** - * 客户端节点id + * 客户端ID */ - private String hostId; + private String clientId; + + /** + * 执行方法参数 + */ + private String argsStr; + + /** + * 参数类型 text/json + */ + private String argsType; + + /** + * 扩展字段 + */ + private String extAttrs; /** * 创建时间 @@ -66,10 +96,5 @@ public class JobTask implements Serializable { */ private LocalDateTime updateDt; - /** - * 逻辑删除 1、删除 - */ - private Integer deleted; - } diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTaskInstance.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTaskBatch.java similarity index 68% rename from easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTaskInstance.java rename to easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTaskBatch.java index 3af883ad..80d546c5 100644 --- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTaskInstance.java +++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/JobTaskBatch.java @@ -3,14 +3,16 @@ package com.aizuda.easy.retry.template.datasource.persistence.po; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; + import java.io.Serializable; import java.time.LocalDateTime; + import lombok.Getter; import lombok.Setter; /** *- * 任务实例 + * 调度任务 *
* * @author www.byteblogs.com @@ -18,15 +20,15 @@ import lombok.Setter; */ @Getter @Setter -@TableName("job_task_instance") -public class JobTaskInstance implements Serializable { +@TableName("job_task_batch") +public class JobTaskBatch implements Serializable { private static final long serialVersionUID = 1L; /** * 主键 */ - @TableId(value = "id", type = IdType.AUTO) + @TableId(value = "id", type = IdType.AUTO) private Long id; /** @@ -40,34 +42,34 @@ public class JobTaskInstance implements Serializable { private Long jobId; /** - * 调度任务id + * 任务状态 0、失败 1、成功 */ - private Long taskId; - - /** - * 父执行器id - */ - private Long parentId; - - /** - * 执行的状态 0、失败 1、成功 - */ - private Integer executeStatus; - - /** - * 执行结果 - */ - private String resultMessage; + private Integer taskStatus; /** * 创建时间 */ private LocalDateTime createDt; + /** + * 任务执行时间 + */ + private LocalDateTime executionAt; + + /** + * 操作原因 + */ + private Integer operationReason; + /** * 修改时间 */ private LocalDateTime updateDt; + /** + * 逻辑删除 1、删除 + */ + private Integer deleted; + } diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/SceneConfig.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/SceneConfig.java index b2bd9324..ddd94c3c 100644 --- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/SceneConfig.java +++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/po/SceneConfig.java @@ -29,8 +29,6 @@ public class SceneConfig implements Serializable { private Long deadlineRequest; - private Integer bucketIndex; - private LocalDateTime createDt; private LocalDateTime updateDt; diff --git a/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobTaskBatchMapper.xml b/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobTaskBatchMapper.xml new file mode 100644 index 00000000..af4ed398 --- /dev/null +++ b/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobTaskBatchMapper.xml @@ -0,0 +1,34 @@ + + +