mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-12 16:57:12 +08:00
refactor: 优化接口文档枚举参数显示效果
This commit is contained in:
@@ -88,4 +88,9 @@ public enum FormTypeEnum implements IBaseEnum<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -103,4 +103,9 @@ public enum QueryTypeEnum implements IBaseEnum<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -132,14 +132,13 @@ public class FieldConfigDO implements Serializable {
|
||||
/**
|
||||
* 表单类型
|
||||
*/
|
||||
@Schema(description = "表单类型", type = "Integer", allowableValues = {"1", "2", "3", "4", "5", "6"}, example = "1")
|
||||
@Schema(description = "表单类型", example = "1")
|
||||
private FormTypeEnum formType;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*/
|
||||
@Schema(description = "查询方式", type = "Integer", allowableValues = {"1", "2", "3", "4", "5", "6", "7", "8", "9",
|
||||
"10", "11", "12", "13", "14"}, example = "1")
|
||||
@Schema(description = "查询方式", example = "1")
|
||||
private QueryTypeEnum queryType;
|
||||
|
||||
/**
|
||||
|
@@ -47,4 +47,9 @@ public enum JobBlockStrategyEnum implements IBaseEnum<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -132,4 +132,9 @@ public enum JobExecuteReasonEnum implements IBaseEnum<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -64,4 +64,9 @@ public enum JobExecuteStatusEnum implements IBaseEnum<Integer> {
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
private final String color;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -52,4 +52,9 @@ public enum JobRouteStrategyEnum implements IBaseEnum<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -44,4 +44,9 @@ public enum JobStatusEnum implements IBaseEnum<Integer> {
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
private final String color;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -49,4 +49,9 @@ public enum JobTaskTypeEnum implements IBaseEnum<Integer> {
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
private final String color;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -42,4 +42,9 @@ public enum JobTriggerTypeEnum implements IBaseEnum<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "%s: %s".formatted(this.value, this.description);
|
||||
}
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import top.continew.admin.job.enums.JobExecuteStatusEnum;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@@ -63,7 +64,7 @@ public class JobLogQuery implements Serializable {
|
||||
* 任务批次状态
|
||||
*/
|
||||
@Schema(description = "任务批次状态", example = "1")
|
||||
private Integer taskBatchStatus;
|
||||
private JobExecuteStatusEnum taskBatchStatus;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
@@ -20,6 +20,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import top.continew.admin.job.enums.JobStatusEnum;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@@ -53,7 +54,7 @@ public class JobQuery implements Serializable {
|
||||
* 任务状态
|
||||
*/
|
||||
@Schema(description = "任务状态", example = "1")
|
||||
private Integer jobStatus;
|
||||
private JobStatusEnum jobStatus;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
|
@@ -49,7 +49,8 @@ public class JobLogServiceImpl implements JobLogService {
|
||||
@Override
|
||||
public PageResp<JobLogResp> page(JobLogQuery query) {
|
||||
return jobClient.requestPage(() -> jobBatchApi.page(query.getJobId(), query.getJobName(), query
|
||||
.getGroupName(), query.getTaskBatchStatus(), query.getDatetimeRange(), query.getPage(), query.getSize()));
|
||||
.getGroupName(), query.getTaskBatchStatus().getValue(), query.getDatetimeRange(), query.getPage(), query
|
||||
.getSize()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -45,8 +45,8 @@ public class JobServiceImpl implements JobService {
|
||||
|
||||
@Override
|
||||
public PageResp<JobResp> page(JobQuery query) {
|
||||
return jobClient.requestPage(() -> jobApi.page(query.getGroupName(), query.getJobName(), query
|
||||
.getJobStatus(), query.getPage(), query.getSize()));
|
||||
return jobClient.requestPage(() -> jobApi.page(query.getGroupName(), query.getJobName(), query.getJobStatus()
|
||||
.getValue(), query.getPage(), query.getSize()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user