refactor(sj_1.1.0-beta3): 增加字段枚举@link

This commit is contained in:
dhb52 2024-07-10 23:18:34 +08:00
parent ba9a2d6944
commit ef94f54d3e
3 changed files with 24 additions and 6 deletions

View File

@ -1,5 +1,8 @@
package com.aizuda.snailjob.template.datasource.persistence.po; package com.aizuda.snailjob.template.datasource.persistence.po;
import com.aizuda.snailjob.common.core.enums.ExecutorTypeEnum;
import com.aizuda.snailjob.common.core.enums.JobTaskTypeEnum;
import com.aizuda.snailjob.common.core.enums.StatusEnum;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -58,6 +61,7 @@ public class Job extends CreateUpdateDt {
/** /**
* 重试状态 0关闭1开启 * 重试状态 0关闭1开启
* {@link StatusEnum}
*/ */
private Integer jobStatus; private Integer jobStatus;
@ -68,6 +72,7 @@ public class Job extends CreateUpdateDt {
/** /**
* 执行器类型 1Java * 执行器类型 1Java
* {@link ExecutorTypeEnum}
*/ */
private Integer executorType; private Integer executorType;
@ -108,6 +113,7 @@ public class Job extends CreateUpdateDt {
/** /**
* 任务类型 * 任务类型
* {@link JobTaskTypeEnum}
*/ */
private Integer taskType; private Integer taskType;

View File

@ -1,15 +1,15 @@
package com.aizuda.snailjob.template.datasource.persistence.po; package com.aizuda.snailjob.template.datasource.persistence.po;
import com.aizuda.snailjob.common.core.enums.JobArgsTypeEnum;
import com.aizuda.snailjob.common.core.enums.JobTaskStatusEnum;
import com.aizuda.snailjob.common.core.enums.MapReduceStageEnum;
import com.aizuda.snailjob.common.core.enums.StatusEnum;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
/** /**
* 任务实例 * 任务实例
* *
@ -58,6 +58,7 @@ public class JobTask extends CreateUpdateDt {
/** /**
* 执行状态 * 执行状态
* {@link JobTaskStatusEnum}
*/ */
private Integer taskStatus; private Integer taskStatus;
@ -83,18 +84,21 @@ public class JobTask extends CreateUpdateDt {
private String argsStr; private String argsStr;
/** /**
* 参数类型 text/json * 参数类型 textjson
* {@link JobArgsTypeEnum}
*/ */
private Integer argsType; private Integer argsType;
/** /**
* 叶子节点(0:非叶子节点 1:叶子节点) * 叶子节点(0:非叶子节点 1:叶子节点)
* {@link StatusEnum}
*/ */
private Integer leaf; private Integer leaf;
/** /**
* 动态分片使用 * 动态分片使用
* 1:map 2:reduce 3:mergeReduce * 1:map 2:reduce 3:mergeReduce
* {@link MapReduceStageEnum}
*/ */
private Integer mrStage; private Integer mrStage;

View File

@ -1,5 +1,9 @@
package com.aizuda.snailjob.server.web.model.request; package com.aizuda.snailjob.server.web.model.request;
import com.aizuda.snailjob.common.core.enums.ExecutorTypeEnum;
import com.aizuda.snailjob.common.core.enums.JobTaskTypeEnum;
import com.aizuda.snailjob.common.core.enums.StatusEnum;
import com.aizuda.snailjob.server.job.task.enums.BlockStrategyEnum;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern; import jakarta.validation.constraints.Pattern;
@ -30,6 +34,7 @@ public class JobRequestVO {
/** /**
* 重试状态 0关闭1开启 * 重试状态 0关闭1开启
* {@link StatusEnum}
*/ */
@NotNull(message = "jobStatus 不能为空") @NotNull(message = "jobStatus 不能为空")
private Integer jobStatus; private Integer jobStatus;
@ -51,7 +56,8 @@ public class JobRequestVO {
private Integer routeKey; private Integer routeKey;
/** /**
* 执行器类型 1Java * 执行器类型
* {@link ExecutorTypeEnum}
*/ */
@NotNull(message = "executorType 不能为空") @NotNull(message = "executorType 不能为空")
private Integer executorType; private Integer executorType;
@ -76,6 +82,7 @@ public class JobRequestVO {
/** /**
* 阻塞策略 1丢弃 2覆盖 3并行 * 阻塞策略 1丢弃 2覆盖 3并行
* {@link BlockStrategyEnum}
*/ */
@NotNull(message = "blockStrategy 不能为空") @NotNull(message = "blockStrategy 不能为空")
private Integer blockStrategy; private Integer blockStrategy;
@ -100,6 +107,7 @@ public class JobRequestVO {
/** /**
* 任务类型 * 任务类型
* {@link JobTaskTypeEnum}
*/ */
@NotNull(message = "taskType 不能为空") @NotNull(message = "taskType 不能为空")
private Integer taskType; private Integer taskType;