fix: required = true ==> requiredMode = Schema.RequiredMode.REQUIRED

This commit is contained in:
xingyu 2023-05-08 10:06:17 +08:00
parent d25062ec81
commit 0b3640a522
342 changed files with 1242 additions and 1231 deletions

View File

@ -15,12 +15,12 @@ public class PageParam implements Serializable {
private static final Integer PAGE_NO = 1; private static final Integer PAGE_NO = 1;
private static final Integer PAGE_SIZE = 10; private static final Integer PAGE_SIZE = 10;
@Schema(description = "页码,从 1 开始", required = true,example = "1") @Schema(description = "页码,从 1 开始", requiredMode = Schema.RequiredMode.REQUIRED,example = "1")
@NotNull(message = "页码不能为空") @NotNull(message = "页码不能为空")
@Min(value = 1, message = "页码最小值为 1") @Min(value = 1, message = "页码最小值为 1")
private Integer pageNo = PAGE_NO; private Integer pageNo = PAGE_NO;
@Schema(description = "每页条数,最大值为 100", required = true, example = "10") @Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
@NotNull(message = "每页条数不能为空") @NotNull(message = "每页条数不能为空")
@Min(value = 1, message = "每页条数最小值为 1") @Min(value = 1, message = "每页条数最小值为 1")
@Max(value = 100, message = "每页条数最大值为 100") @Max(value = 100, message = "每页条数最大值为 100")

View File

@ -11,10 +11,10 @@ import java.util.List;
@Data @Data
public final class PageResult<T> implements Serializable { public final class PageResult<T> implements Serializable {
@Schema(description = "数据", required = true) @Schema(description = "数据", requiredMode = Schema.RequiredMode.REQUIRED)
private List<T> list; private List<T> list;
@Schema(description = "总量", required = true) @Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long total; private Long total;
public PageResult() { public PageResult() {

View File

@ -10,11 +10,11 @@ import javax.validation.constraints.*;
@Data @Data
public class BpmFormBaseVO { public class BpmFormBaseVO {
@Schema(description = "表单名称", required = true, example = "芋道") @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotNull(message = "表单名称不能为空") @NotNull(message = "表单名称不能为空")
private String name; private String name;
@Schema(description = "表单状态-参见 CommonStatusEnum 枚举", required = true, example = "1") @Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "表单状态不能为空") @NotNull(message = "表单状态不能为空")
private Integer status; private Integer status;

View File

@ -11,11 +11,11 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmFormCreateReqVO extends BpmFormBaseVO { public class BpmFormCreateReqVO extends BpmFormBaseVO {
@Schema(description = "表单的配置-JSON 字符串", required = true) @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单的配置不能为空") @NotNull(message = "表单的配置不能为空")
private String conf; private String conf;
@Schema(description = "表单项的数组-JSON 字符串的数组", required = true) @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单项的数组不能为空") @NotNull(message = "表单项的数组不能为空")
private List<String> fields; private List<String> fields;

View File

@ -14,18 +14,18 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmFormRespVO extends BpmFormBaseVO { public class BpmFormRespVO extends BpmFormBaseVO {
@Schema(description = "表单编号", required = true, example = "1024") @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "表单的配置-JSON 字符串", required = true) @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单的配置不能为空") @NotNull(message = "表单的配置不能为空")
private String conf; private String conf;
@Schema(description = "表单项的数组-JSON 字符串的数组", required = true) @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单项的数组不能为空") @NotNull(message = "表单项的数组不能为空")
private List<String> fields; private List<String> fields;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -7,10 +7,10 @@ import lombok.Data;
@Data @Data
public class BpmFormSimpleRespVO { public class BpmFormSimpleRespVO {
@Schema(description = "表单编号", required = true, example = "1024") @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "表单名称", required = true, example = "芋道") @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
} }

View File

@ -10,15 +10,15 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmFormUpdateReqVO extends BpmFormBaseVO { public class BpmFormUpdateReqVO extends BpmFormBaseVO {
@Schema(description = "表单编号", required = true, example = "1024") @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "表单编号不能为空") @NotNull(message = "表单编号不能为空")
private Long id; private Long id;
@Schema(description = "表单的配置-JSON 字符串", required = true) @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单的配置不能为空") @NotNull(message = "表单的配置不能为空")
private String conf; private String conf;
@Schema(description = "表单项的数组-JSON 字符串的数组", required = true) @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单项的数组不能为空") @NotNull(message = "表单项的数组不能为空")
private List<String> fields; private List<String> fields;

View File

@ -1,8 +1,10 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.Data;
import java.util.*;
import javax.validation.constraints.*; import javax.validation.constraints.NotNull;
import java.util.Set;
/** /**
* 用户组 Base VO提供给添加修改详细的子 VO 使用 * 用户组 Base VO提供给添加修改详细的子 VO 使用
@ -11,19 +13,19 @@ import javax.validation.constraints.*;
@Data @Data
public class BpmUserGroupBaseVO { public class BpmUserGroupBaseVO {
@Schema(description = "组名", required = true, example = "芋道") @Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotNull(message = "组名不能为空") @NotNull(message = "组名不能为空")
private String name; private String name;
@Schema(description = "描述", required = true, example = "芋道源码") @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
@NotNull(message = "描述不能为空") @NotNull(message = "描述不能为空")
private String description; private String description;
@Schema(description = "成员编号数组", required = true, example = "1,2,3") @Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
@NotNull(message = "成员编号数组不能为空") @NotNull(message = "成员编号数组不能为空")
private Set<Long> memberUserIds; private Set<Long> memberUserIds;
@Schema(description = "状态", required = true, example = "1") @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态不能为空") @NotNull(message = "状态不能为空")
private Integer status; private Integer status;

View File

@ -1,20 +1,20 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Schema(description = "管理后台 - 用户组 Response VO") @Schema(description = "管理后台 - 用户组 Response VO")
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { public class BpmUserGroupRespVO extends BpmUserGroupBaseVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -11,10 +11,10 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
public class BpmUserGroupSimpleRespVO { public class BpmUserGroupSimpleRespVO {
@Schema(description = "用户组编号", required = true, example = "1024") @Schema(description = "用户组编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "用户组名字", required = true, example = "芋道") @Schema(description = "用户组名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
} }

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -9,7 +10,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "编号不能为空") @NotNull(message = "编号不能为空")
private Long id; private Long id;

View File

@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmModeImportReqVO extends BpmModelCreateReqVO { public class BpmModeImportReqVO extends BpmModelCreateReqVO {
@Schema(description = "BPMN 文件", required = true) @Schema(description = "BPMN 文件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "BPMN 文件不能为空") @NotNull(message = "BPMN 文件不能为空")
private MultipartFile bpmnFile; private MultipartFile bpmnFile;

View File

@ -11,11 +11,11 @@ import javax.validation.constraints.NotEmpty;
@Data @Data
public class BpmModelBaseVO { public class BpmModelBaseVO {
@Schema(description = "流程标识", required = true, example = "process_yudao") @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao")
@NotEmpty(message = "流程标识不能为空") @NotEmpty(message = "流程标识不能为空")
private String key; private String key;
@Schema(description = "流程名称", required = true, example = "芋道") @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "流程名称不能为空") @NotEmpty(message = "流程名称不能为空")
private String name; private String name;

View File

@ -11,11 +11,11 @@ import javax.validation.constraints.NotEmpty;
@Data @Data
public class BpmModelCreateReqVO { public class BpmModelCreateReqVO {
@Schema(description = "流程标识", required = true, example = "process_yudao") @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao")
@NotEmpty(message = "流程标识不能为空") @NotEmpty(message = "流程标识不能为空")
private String key; private String key;
@Schema(description = "流程名称", required = true, example = "芋道") @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "流程名称不能为空") @NotEmpty(message = "流程名称不能为空")
private String name; private String name;

View File

@ -13,13 +13,13 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmModelPageItemRespVO extends BpmModelBaseVO { public class BpmModelPageItemRespVO extends BpmModelBaseVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "表单名字", example = "请假表单") @Schema(description = "表单名字", example = "请假表单")
private String formName; private String formName;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
@ -31,16 +31,16 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO {
@Data @Data
public static class ProcessDefinition { public static class ProcessDefinition {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "版本", required = true, example = "1") @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer version; private Integer version;
@Schema(description = "部署时间", required = true) @Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime deploymentTime; private LocalDateTime deploymentTime;
@Schema(description = "中断状态-参见 SuspensionState 枚举", required = true, example = "1") @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer suspensionState; private Integer suspensionState;
} }

View File

@ -13,13 +13,13 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmModelRespVO extends BpmModelBaseVO { public class BpmModelRespVO extends BpmModelBaseVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "BPMN XML", required = true) @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
private String bpmnXml; private String bpmnXml;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -9,7 +9,7 @@ import javax.validation.constraints.NotEmpty;
@Data @Data
public class BpmModelUpdateReqVO { public class BpmModelUpdateReqVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "编号不能为空") @NotEmpty(message = "编号不能为空")
private String id; private String id;
@ -22,7 +22,7 @@ public class BpmModelUpdateReqVO {
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") @Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
private String category; private String category;
@Schema(description = "BPMN XML", required = true) @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
private String bpmnXml; private String bpmnXml;
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")

View File

@ -9,11 +9,11 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class BpmModelUpdateStateReqVO { public class BpmModelUpdateStateReqVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "编号不能为空") @NotNull(message = "编号不能为空")
private String id; private String id;
@Schema(description = "状态-见 SuspensionState 枚举", required = true, example = "1") @Schema(description = "状态-见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态不能为空") @NotNull(message = "状态不能为空")
private Integer state; private Integer state;

View File

@ -16,7 +16,7 @@ public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionResp
@Schema(description = "表单名字", example = "请假表单") @Schema(description = "表单名字", example = "请假表单")
private String formName; private String formName;
@Schema(description = "部署时间", required = true) @Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime deploymentTime; private LocalDateTime deploymentTime;
} }

View File

@ -4,20 +4,19 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@Schema(description = "管理后台 - 流程定义 Response VO") @Schema(description = "管理后台 - 流程定义 Response VO")
@Data @Data
public class BpmProcessDefinitionRespVO { public class BpmProcessDefinitionRespVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "版本", required = true, example = "1") @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer version; private Integer version;
@Schema(description = "流程名称", required = true, example = "芋道") @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "流程名称不能为空") @NotEmpty(message = "流程名称不能为空")
private String name; private String name;
@ -32,9 +31,9 @@ public class BpmProcessDefinitionRespVO {
private Integer formType; private Integer formType;
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
private Long formId; private Long formId;
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true) @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private String formConf; private String formConf;
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true) @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> formFields; private List<String> formFields;
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/create") example = "/bpm/oa/leave/create")
@ -43,7 +42,7 @@ public class BpmProcessDefinitionRespVO {
example = "/bpm/oa/leave/view") example = "/bpm/oa/leave/view")
private String formCustomViewPath; private String formCustomViewPath;
@Schema(description = "中断状态-参见 SuspensionState 枚举", required = true, example = "1") @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer suspensionState; private Integer suspensionState;
} }

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Set; import java.util.Set;
@ -13,11 +13,11 @@ import java.util.Set;
@Data @Data
public class BpmTaskAssignRuleBaseVO { public class BpmTaskAssignRuleBaseVO {
@Schema(description = "规则类型", required = true, example = "bpm_task_assign_rule_type") @Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "bpm_task_assign_rule_type")
@NotNull(message = "规则类型不能为空") @NotNull(message = "规则类型不能为空")
private Integer type; private Integer type;
@Schema(description = "规则值数组", required = true, example = "1,2,3") @Schema(description = "规则值数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
@NotNull(message = "规则值数组不能为空") @NotNull(message = "规则值数组不能为空")
private Set<Long> options; private Set<Long> options;

View File

@ -13,11 +13,11 @@ import javax.validation.constraints.NotEmpty;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO {
@Schema(description = "流程模型的编号", required = true, example = "1024") @Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "流程模型的编号不能为空") @NotEmpty(message = "流程模型的编号不能为空")
private String modelId; private String modelId;
@Schema(description = "流程任务定义的编号", required = true, example = "2048") @Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
@NotEmpty(message = "流程任务定义的编号不能为空") @NotEmpty(message = "流程任务定义的编号不能为空")
private String taskDefinitionKey; private String taskDefinitionKey;

View File

@ -11,18 +11,18 @@ import lombok.ToString;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO {
@Schema(description = "任务分配规则的编号", required = true, example = "1024") @Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "流程模型的编号", required = true, example = "2048") @Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String modelId; private String modelId;
@Schema(description = "流程定义的编号", required = true, example = "4096") @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096")
private String processDefinitionId; private String processDefinitionId;
@Schema(description = "流程任务定义的编号", required = true, example = "2048") @Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String taskDefinitionKey; private String taskDefinitionKey;
@Schema(description = "流程任务定义的名字", required = true, example = "关注芋道") @Schema(description = "流程任务定义的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "关注芋道")
private String taskDefinitionName; private String taskDefinitionName;
} }

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO {
@Schema(description = "任务分配规则的编号", required = true, example = "1024") @Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "任务分配规则的编号不能为空") @NotNull(message = "任务分配规则的编号不能为空")
private Long id; private Long id;

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -14,19 +15,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data @Data
public class BpmOALeaveBaseVO { public class BpmOALeaveBaseVO {
@Schema(description = "请假的开始时间", required = true) @Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始时间不能为空") @NotNull(message = "开始时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime startTime; private LocalDateTime startTime;
@Schema(description = "请假的结束时间", required = true) @Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "结束时间不能为空") @NotNull(message = "结束时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", required = true, example = "1") @Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer type; private Integer type;
@Schema(description = "原因", required = true, example = "阅读芋道源码") @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
private String reason; private String reason;
} }

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -14,13 +15,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
@Schema(description = "请假表单主键", required = true, example = "1024") @Schema(description = "请假表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "状态-参见 bpm_process_instance_result 枚举", required = true, example = "1") @Schema(description = "状态-参见 bpm_process_instance_result 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer result; private Integer result;
@Schema(description = "申请时间", required = true) @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "申请时间不能为空") @NotNull(message = "申请时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime createTime; private LocalDateTime createTime;

View File

@ -9,14 +9,14 @@ import java.time.LocalDateTime;
@Data @Data
public class BpmActivityRespVO { public class BpmActivityRespVO {
@Schema(description = "流程活动的标识", required = true, example = "1024") @Schema(description = "流程活动的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String key; private String key;
@Schema(description = "流程活动的类型", required = true, example = "StartEvent") @Schema(description = "流程活动的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent")
private String type; private String type;
@Schema(description = "流程活动的开始时间", required = true) @Schema(description = "流程活动的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime startTime; private LocalDateTime startTime;
@Schema(description = "流程活动的结束时间", required = true) @Schema(description = "流程活动的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "关联的流程任务的编号-关联的流程任务,只有 UserTask 等类型才有", example = "2048") @Schema(description = "关联的流程任务的编号-关联的流程任务,只有 UserTask 等类型才有", example = "2048")

View File

@ -4,18 +4,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
@Schema(description = "管理后台 - 流程实例的取消 Request VO") @Schema(description = "管理后台 - 流程实例的取消 Request VO")
@Data @Data
public class BpmProcessInstanceCancelReqVO { public class BpmProcessInstanceCancelReqVO {
@Schema(description = "流程实例的编号", required = true, example = "1024") @Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "流程实例的编号不能为空") @NotEmpty(message = "流程实例的编号不能为空")
private String id; private String id;
@Schema(description = "取消原因", required = true, example = "不请假了!") @Schema(description = "取消原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!")
@NotEmpty(message = "取消原因不能为空") @NotEmpty(message = "取消原因不能为空")
private String reason; private String reason;

View File

@ -10,7 +10,7 @@ import java.util.Map;
@Data @Data
public class BpmProcessInstanceCreateReqVO { public class BpmProcessInstanceCreateReqVO {
@Schema(description = "流程定义的编号", required = true, example = "1024") @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "流程定义编号不能为空") @NotEmpty(message = "流程定义编号不能为空")
private String processDefinitionId; private String processDefinitionId;

View File

@ -10,28 +10,28 @@ import java.util.List;
@Data @Data
public class BpmProcessInstancePageItemRespVO { public class BpmProcessInstancePageItemRespVO {
@Schema(description = "流程实例的编号", required = true, example = "1024") @Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "流程名称", required = true, example = "芋道") @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
@Schema(description = "流程定义的编号", required = true, example = "2048") @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String processDefinitionId; private String processDefinitionId;
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", required = true, example = "1") @Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private String category; private String category;
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", required = true, example = "1") @Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; private Integer status;
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", required = true, example = "2") @Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer result; private Integer result;
@Schema(description = "提交时间", required = true) @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "结束时间", required = true) @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime; private LocalDateTime endTime;
/** /**
@ -43,10 +43,10 @@ public class BpmProcessInstancePageItemRespVO {
@Data @Data
public static class Task { public static class Task {
@Schema(description = "流程任务的编号", required = true, example = "1024") @Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "任务名称", required = true, example = "芋道") @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
} }

View File

@ -11,28 +11,28 @@ import java.util.Map;
@Data @Data
public class BpmProcessInstanceRespVO { public class BpmProcessInstanceRespVO {
@Schema(description = "流程实例的编号", required = true, example = "1024") @Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "流程名称", required = true, example = "芋道") @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", required = true, example = "1") @Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private String category; private String category;
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", required = true, example = "1") @Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; private Integer status;
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", required = true, example = "2") @Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer result; private Integer result;
@Schema(description = "提交时间", required = true) @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "结束时间", required = true) @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "提交的表单值", required = true) @Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED)
private Map<String, Object> formVariables; private Map<String, Object> formVariables;
@Schema(description = "业务的唯一标识-例如说,请假申请的编号", example = "1") @Schema(description = "业务的唯一标识-例如说,请假申请的编号", example = "1")
@ -52,14 +52,14 @@ public class BpmProcessInstanceRespVO {
@Data @Data
public static class User { public static class User {
@Schema(description = "用户编号", required = true, example = "1") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "用户昵称", required = true, example = "芋艿") @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String nickname; private String nickname;
@Schema(description = "部门编号", required = true, example = "1") @Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId; private Long deptId;
@Schema(description = "部门名称", required = true, example = "研发部") @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
private String deptName; private String deptName;
} }
@ -68,16 +68,16 @@ public class BpmProcessInstanceRespVO {
@Data @Data
public static class ProcessDefinition { public static class ProcessDefinition {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType; private Integer formType;
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
private Long formId; private Long formId;
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true) @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private String formConf; private String formConf;
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true) @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> formFields; private List<String> formFields;
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/create") example = "/bpm/oa/leave/create")
@ -86,7 +86,7 @@ public class BpmProcessInstanceRespVO {
example = "/bpm/oa/leave/view") example = "/bpm/oa/leave/view")
private String formCustomViewPath; private String formCustomViewPath;
@Schema(description = "BPMN XML", required = true) @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
private String bpmnXml; private String bpmnXml;
} }

View File

@ -9,11 +9,11 @@ import javax.validation.constraints.NotEmpty;
@Data @Data
public class BpmTaskApproveReqVO { public class BpmTaskApproveReqVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "任务编号不能为空") @NotEmpty(message = "任务编号不能为空")
private String id; private String id;
@Schema(description = "审批意见", required = true, example = "不错不错!") @Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!")
@NotEmpty(message = "审批意见不能为空") @NotEmpty(message = "审批意见不能为空")
private String reason; private String reason;

View File

@ -13,14 +13,14 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO {
@Schema(description = "结束时间", required = true) @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "持续时间", required = true, example = "1000") @Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
private Long durationInMillis; private Long durationInMillis;
@Schema(description = "任务结果-参见 bpm_process_instance_result", required = true, example = "2") @Schema(description = "任务结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer result; private Integer result;
@Schema(description = "审批建议", required = true, example = "不请假了!") @Schema(description = "审批建议", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!")
private String reason; private String reason;
} }

View File

@ -9,11 +9,11 @@ import javax.validation.constraints.NotEmpty;
@Data @Data
public class BpmTaskRejectReqVO { public class BpmTaskRejectReqVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "任务编号不能为空") @NotEmpty(message = "任务编号不能为空")
private String id; private String id;
@Schema(description = "审批意见", required = true, example = "不错不错!") @Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!")
@NotEmpty(message = "审批意见不能为空") @NotEmpty(message = "审批意见不能为空")
private String reason; private String reason;

View File

@ -11,7 +11,7 @@ import lombok.ToString;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
@Schema(description = "任务定义的标识", required = true, example = "user-001") @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "user-001")
private String definitionKey; private String definitionKey;
/** /**
@ -23,14 +23,14 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
@Data @Data
public static class User { public static class User {
@Schema(description = "用户编号", required = true, example = "1") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "用户昵称", required = true, example = "芋艿") @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String nickname; private String nickname;
@Schema(description = "部门编号", required = true, example = "1") @Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId; private Long deptId;
@Schema(description = "部门名称", required = true, example = "研发部") @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
private String deptName; private String deptName;
} }

View File

@ -9,19 +9,19 @@ import java.time.LocalDateTime;
@Data @Data
public class BpmTaskTodoPageItemRespVO { public class BpmTaskTodoPageItemRespVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "任务名字", required = true, example = "芋道") @Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
@Schema(description = "接收时间", required = true) @Schema(description = "接收时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime claimTime; private LocalDateTime claimTime;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "激活状态-参见 SuspensionState 枚举", required = true, example = "1") @Schema(description = "激活状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer suspensionState; private Integer suspensionState;
/** /**
@ -33,19 +33,19 @@ public class BpmTaskTodoPageItemRespVO {
@Schema(description = "流程实例") @Schema(description = "流程实例")
public static class ProcessInstance { public static class ProcessInstance {
@Schema(description = "流程实例编号", required = true, example = "1024") @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id; private String id;
@Schema(description = "流程实例名称", required = true, example = "芋道") @Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
@Schema(description = "发起人的用户编号", required = true, example = "1024") @Schema(description = "发起人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long startUserId; private Long startUserId;
@Schema(description = "发起人的用户昵称", required = true, example = "芋艿") @Schema(description = "发起人的用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String startUserNickname; private String startUserNickname;
@Schema(description = "流程定义的编号", required = true, example = "2048") @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String processDefinitionId; private String processDefinitionId;
} }

View File

@ -2,9 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.bytebuddy.implementation.bind.annotation.Empty;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@ -13,11 +10,11 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class BpmTaskUpdateAssigneeReqVO { public class BpmTaskUpdateAssigneeReqVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "任务编号不能为空") @NotEmpty(message = "任务编号不能为空")
private String id; private String id;
@Schema(description = "新审批人的用户编号", required = true, example = "2048") @Schema(description = "新审批人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
@NotNull(message = "新审批人的用户编号不能为空") @NotNull(message = "新审批人的用户编号不能为空")
private Long assigneeUserId; private Long assigneeUserId;

View File

@ -10,11 +10,11 @@ import java.util.List;
@Data @Data
public class CodegenCreateListReqVO { public class CodegenCreateListReqVO {
@Schema(description = "数据源配置的编号", required = true, example = "1") @Schema(description = "数据源配置的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "数据源配置的编号不能为空") @NotNull(message = "数据源配置的编号不能为空")
private Long dataSourceConfigId; private Long dataSourceConfigId;
@Schema(description = "表名数组", required = true, example = "[1, 2, 3]") @Schema(description = "表名数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2, 3]")
@NotNull(message = "表名数组不能为空") @NotNull(message = "表名数组不能为空")
private List<String> tableNames; private List<String> tableNames;

View File

@ -7,10 +7,10 @@ import lombok.Data;
@Data @Data
public class CodegenPreviewRespVO { public class CodegenPreviewRespVO {
@Schema(description = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") @Schema(description = "文件路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java")
private String filePath; private String filePath;
@Schema(description = "代码", required = true, example = "Hello World") @Schema(description = "代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "Hello World")
private String code; private String code;
} }

View File

@ -33,7 +33,7 @@ public class CodegenUpdateReqVO {
@Valid @Valid
public static class Table extends CodegenTableBaseVO { public static class Table extends CodegenTableBaseVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@AssertTrue(message = "上级菜单不能为空,请前往 [修改生成配置 -> 生成信息] 界面,设置“上级菜单”字段") @AssertTrue(message = "上级菜单不能为空,请前往 [修改生成配置 -> 生成信息] 界面,设置“上级菜单”字段")
@ -51,7 +51,7 @@ public class CodegenUpdateReqVO {
@ToString(callSuper = true) @ToString(callSuper = true)
public static class Column extends CodegenColumnBaseVO { public static class Column extends CodegenColumnBaseVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
} }

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -11,43 +12,43 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class CodegenColumnBaseVO { public class CodegenColumnBaseVO {
@Schema(description = "表编号", required = true, example = "1") @Schema(description = "表编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "表编号不能为空") @NotNull(message = "表编号不能为空")
private Long tableId; private Long tableId;
@Schema(description = "字段名", required = true, example = "user_age") @Schema(description = "字段名", requiredMode = Schema.RequiredMode.REQUIRED, example = "user_age")
@NotNull(message = "字段名不能为空") @NotNull(message = "字段名不能为空")
private String columnName; private String columnName;
@Schema(description = "字段类型", required = true, example = "int(11)") @Schema(description = "字段类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "int(11)")
@NotNull(message = "字段类型不能为空") @NotNull(message = "字段类型不能为空")
private String dataType; private String dataType;
@Schema(description = "字段描述", required = true, example = "年龄") @Schema(description = "字段描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "年龄")
@NotNull(message = "字段描述不能为空") @NotNull(message = "字段描述不能为空")
private String columnComment; private String columnComment;
@Schema(description = "是否允许为空", required = true, example = "true") @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否允许为空不能为空") @NotNull(message = "是否允许为空不能为空")
private Boolean nullable; private Boolean nullable;
@Schema(description = "是否主键", required = true, example = "false") @Schema(description = "是否主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
@NotNull(message = "是否主键不能为空") @NotNull(message = "是否主键不能为空")
private Boolean primaryKey; private Boolean primaryKey;
@Schema(description = "是否自增", required = true, example = "true") @Schema(description = "是否自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否自增不能为空") @NotNull(message = "是否自增不能为空")
private String autoIncrement; private String autoIncrement;
@Schema(description = "排序", required = true, example = "10") @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
@NotNull(message = "排序不能为空") @NotNull(message = "排序不能为空")
private Integer ordinalPosition; private Integer ordinalPosition;
@Schema(description = "Java 属性类型", required = true, example = "userAge") @Schema(description = "Java 属性类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "userAge")
@NotNull(message = "Java 属性类型不能为空") @NotNull(message = "Java 属性类型不能为空")
private String javaType; private String javaType;
@Schema(description = "Java 属性名", required = true, example = "Integer") @Schema(description = "Java 属性名", requiredMode = Schema.RequiredMode.REQUIRED, example = "Integer")
@NotNull(message = "Java 属性名不能为空") @NotNull(message = "Java 属性名不能为空")
private String javaField; private String javaField;
@ -57,27 +58,27 @@ public class CodegenColumnBaseVO {
@Schema(description = "数据示例", example = "1024") @Schema(description = "数据示例", example = "1024")
private String example; private String example;
@Schema(description = "是否为 Create 创建操作的字段", required = true, example = "true") @Schema(description = "是否为 Create 创建操作的字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否为 Create 创建操作的字段不能为空") @NotNull(message = "是否为 Create 创建操作的字段不能为空")
private Boolean createOperation; private Boolean createOperation;
@Schema(description = "是否为 Update 更新操作的字段", required = true, example = "false") @Schema(description = "是否为 Update 更新操作的字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
@NotNull(message = "是否为 Update 更新操作的字段不能为空") @NotNull(message = "是否为 Update 更新操作的字段不能为空")
private Boolean updateOperation; private Boolean updateOperation;
@Schema(description = "是否为 List 查询操作的字段", required = true, example = "true") @Schema(description = "是否为 List 查询操作的字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否为 List 查询操作的字段不能为空") @NotNull(message = "是否为 List 查询操作的字段不能为空")
private Boolean listOperation; private Boolean listOperation;
@Schema(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", required = true, example = "LIKE") @Schema(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "LIKE")
@NotNull(message = "List 查询操作的条件类型不能为空") @NotNull(message = "List 查询操作的条件类型不能为空")
private String listOperationCondition; private String listOperationCondition;
@Schema(description = "是否为 List 查询操作的返回字段", required = true, example = "true") @Schema(description = "是否为 List 查询操作的返回字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否为 List 查询操作的返回字段不能为空") @NotNull(message = "是否为 List 查询操作的返回字段不能为空")
private Boolean listOperationResult; private Boolean listOperationResult;
@Schema(description = "显示类型", required = true, example = "input") @Schema(description = "显示类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "input")
@NotNull(message = "显示类型不能为空") @NotNull(message = "显示类型不能为空")
private String htmlType; private String htmlType;

View File

@ -13,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class CodegenColumnRespVO extends CodegenColumnBaseVO { public class CodegenColumnRespVO extends CodegenColumnBaseVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -1,56 +1,57 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
/** /**
* 代码生成 Base VO提供给添加修改详细的子 VO 使用 * 代码生成 Base VO提供给添加修改详细的子 VO 使用
* 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成 * 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成
*/ */
@Data @Data
public class CodegenTableBaseVO { public class CodegenTableBaseVO {
@Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", required = true, example = "1") @Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "导入类型不能为空") @NotNull(message = "导入类型不能为空")
private Integer scene; private Integer scene;
@Schema(description = "表名称", required = true, example = "yudao") @Schema(description = "表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
@NotNull(message = "表名称不能为空") @NotNull(message = "表名称不能为空")
private String tableName; private String tableName;
@Schema(description = "表描述", required = true, example = "芋道") @Schema(description = "表描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotNull(message = "表描述不能为空") @NotNull(message = "表描述不能为空")
private String tableComment; private String tableComment;
@Schema(description = "备注", example = "我是备注") @Schema(description = "备注", example = "我是备注")
private String remark; private String remark;
@Schema(description = "模块名", required = true, example = "system") @Schema(description = "模块名", requiredMode = Schema.RequiredMode.REQUIRED, example = "system")
@NotNull(message = "模块名不能为空") @NotNull(message = "模块名不能为空")
private String moduleName; private String moduleName;
@Schema(description = "业务名", required = true, example = "codegen") @Schema(description = "业务名", requiredMode = Schema.RequiredMode.REQUIRED, example = "codegen")
@NotNull(message = "业务名不能为空") @NotNull(message = "业务名不能为空")
private String businessName; private String businessName;
@Schema(description = "类名称", required = true, example = "CodegenTable") @Schema(description = "类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "CodegenTable")
@NotNull(message = "类名称不能为空") @NotNull(message = "类名称不能为空")
private String className; private String className;
@Schema(description = "类描述", required = true, example = "代码生成器的表定义") @Schema(description = "类描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "代码生成器的表定义")
@NotNull(message = "类描述不能为空") @NotNull(message = "类描述不能为空")
private String classComment; private String classComment;
@Schema(description = "作者", required = true, example = "芋道源码") @Schema(description = "作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
@NotNull(message = "作者不能为空") @NotNull(message = "作者不能为空")
private String author; private String author;
@Schema(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", required = true, example = "1") @Schema(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "模板类型不能为空") @NotNull(message = "模板类型不能为空")
private Integer templateType; private Integer templateType;
@Schema(description = "前端类型,参见 CodegenFrontTypeEnum 枚举", required = true, example = "20") @Schema(description = "前端类型,参见 CodegenFrontTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
@NotNull(message = "前端类型不能为空") @NotNull(message = "前端类型不能为空")
private Integer frontType; private Integer frontType;

View File

@ -13,16 +13,16 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class CodegenTableRespVO extends CodegenTableBaseVO { public class CodegenTableRespVO extends CodegenTableBaseVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "主键编号", required = true, example = "1024") @Schema(description = "主键编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer dataSourceConfigId; private Integer dataSourceConfigId;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "更新时间", required = true) @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime; private LocalDateTime updateTime;
} }

View File

@ -7,10 +7,10 @@ import lombok.Data;
@Data @Data
public class DatabaseTableRespVO { public class DatabaseTableRespVO {
@Schema(description = "表名称", required = true, example = "yuanma") @Schema(description = "表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "yuanma")
private String name; private String name;
@Schema(description = "表描述", required = true, example = "芋道源码") @Schema(description = "表描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
private String comment; private String comment;
} }

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo; package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -14,22 +15,22 @@ import javax.validation.constraints.Size;
@Data @Data
public class ConfigBaseVO { public class ConfigBaseVO {
@Schema(description = "参数分组", required = true, example = "biz") @Schema(description = "参数分组", requiredMode = Schema.RequiredMode.REQUIRED, example = "biz")
@NotEmpty(message = "参数分组不能为空") @NotEmpty(message = "参数分组不能为空")
@Size(max = 50, message = "参数名称不能超过50个字符") @Size(max = 50, message = "参数名称不能超过50个字符")
private String category; private String category;
@Schema(description = "参数名称", required = true, example = "数据库名") @Schema(description = "参数名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "数据库名")
@NotBlank(message = "参数名称不能为空") @NotBlank(message = "参数名称不能为空")
@Size(max = 100, message = "参数名称不能超过100个字符") @Size(max = 100, message = "参数名称不能超过100个字符")
private String name; private String name;
@Schema(description = "参数键值", required = true, example = "1024") @Schema(description = "参数键值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotBlank(message = "参数键值不能为空") @NotBlank(message = "参数键值不能为空")
@Size(max = 500, message = "参数键值长度不能超过500个字符") @Size(max = 500, message = "参数键值长度不能超过500个字符")
private String value; private String value;
@Schema(description = "是否可见", required = true, example = "true") @Schema(description = "是否可见", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否可见不能为空") @NotNull(message = "是否可见不能为空")
private Boolean visible; private Boolean visible;

View File

@ -12,7 +12,7 @@ import javax.validation.constraints.Size;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class ConfigCreateReqVO extends ConfigBaseVO { public class ConfigCreateReqVO extends ConfigBaseVO {
@Schema(description = "参数键名", required = true, example = "yunai.db.username") @Schema(description = "参数键名", requiredMode = Schema.RequiredMode.REQUIRED, example = "yunai.db.username")
@NotBlank(message = "参数键名长度不能为空") @NotBlank(message = "参数键名长度不能为空")
@Size(max = 100, message = "参数键名长度不能超过100个字符") @Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key; private String key;

View File

@ -13,18 +13,18 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class ConfigRespVO extends ConfigBaseVO { public class ConfigRespVO extends ConfigBaseVO {
@Schema(description = "参数配置序号", required = true, example = "1024") @Schema(description = "参数配置序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "参数键名", required = true, example = "yunai.db.username") @Schema(description = "参数键名", requiredMode = Schema.RequiredMode.REQUIRED, example = "yunai.db.username")
@NotBlank(message = "参数键名长度不能为空") @NotBlank(message = "参数键名长度不能为空")
@Size(max = 100, message = "参数键名长度不能超过100个字符") @Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key; private String key;
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", required = true, example = "1") @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer type; private Integer type;
@Schema(description = "创建时间", required = true, example = "时间戳格式") @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式")
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ConfigUpdateReqVO extends ConfigBaseVO { public class ConfigUpdateReqVO extends ConfigBaseVO {
@Schema(description = "参数配置序号", required = true, example = "1024") @Schema(description = "参数配置序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "参数配置编号不能为空") @NotNull(message = "参数配置编号不能为空")
private Long id; private Long id;

View File

@ -10,15 +10,15 @@ import javax.validation.constraints.*;
@Data @Data
public class DataSourceConfigBaseVO { public class DataSourceConfigBaseVO {
@Schema(description = "数据源名称", required = true, example = "test") @Schema(description = "数据源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "test")
@NotNull(message = "数据源名称不能为空") @NotNull(message = "数据源名称不能为空")
private String name; private String name;
@Schema(description = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro") @Schema(description = "数据源连接", requiredMode = Schema.RequiredMode.REQUIRED, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro")
@NotNull(message = "数据源连接不能为空") @NotNull(message = "数据源连接不能为空")
private String url; private String url;
@Schema(description = "用户名", required = true, example = "root") @Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "root")
@NotNull(message = "用户名不能为空") @NotNull(message = "用户名不能为空")
private String username; private String username;

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo; package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -9,7 +10,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO { public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO {
@Schema(description = "密码", required = true, example = "123456") @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
@NotNull(message = "密码不能为空") @NotNull(message = "密码不能为空")
private String password; private String password;

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo; package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
@ -10,10 +11,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class DataSourceConfigRespVO extends DataSourceConfigBaseVO { public class DataSourceConfigRespVO extends DataSourceConfigBaseVO {
@Schema(description = "主键编号", required = true, example = "1024") @Schema(description = "主键编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer id; private Integer id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo; package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -9,11 +10,11 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO { public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO {
@Schema(description = "主键编号", required = true, example = "1024") @Schema(description = "主键编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "主键编号不能为空") @NotNull(message = "主键编号不能为空")
private Long id; private Long id;
@Schema(description = "密码", required = true, example = "123456") @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
@NotNull(message = "密码不能为空") @NotNull(message = "密码不能为空")
private String password; private String password;

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -11,7 +12,7 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class FileConfigBaseVO { public class FileConfigBaseVO {
@Schema(description = "配置名", required = true, example = "S3 - 阿里云") @Schema(description = "配置名", requiredMode = Schema.RequiredMode.REQUIRED, example = "S3 - 阿里云")
@NotNull(message = "配置名不能为空") @NotNull(message = "配置名不能为空")
private String name; private String name;

View File

@ -14,11 +14,11 @@ import java.util.Map;
@ToString(callSuper = true) @ToString(callSuper = true)
public class FileConfigCreateReqVO extends FileConfigBaseVO { public class FileConfigCreateReqVO extends FileConfigBaseVO {
@Schema(description = "存储器,参见 FileStorageEnum 枚举类参见 FileStorageEnum 枚举类", required = true, example = "1") @Schema(description = "存储器,参见 FileStorageEnum 枚举类参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "存储器不能为空") @NotNull(message = "存储器不能为空")
private Integer storage; private Integer storage;
@Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true) @Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "存储配置不能为空") @NotNull(message = "存储配置不能为空")
private Map<String, Object> config; private Map<String, Object> config;

View File

@ -15,21 +15,21 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class FileConfigRespVO extends FileConfigBaseVO { public class FileConfigRespVO extends FileConfigBaseVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1") @Schema(description = "存储器,参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "存储器不能为空") @NotNull(message = "存储器不能为空")
private Integer storage; private Integer storage;
@Schema(description = "是否为主配置", required = true, example = "true") @Schema(description = "是否为主配置", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否为主配置不能为空") @NotNull(message = "是否为主配置不能为空")
private Boolean master; private Boolean master;
@Schema(description = "存储配置", required = true) @Schema(description = "存储配置", requiredMode = Schema.RequiredMode.REQUIRED)
private FileClientConfig config; private FileClientConfig config;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -14,11 +14,11 @@ import java.util.Map;
@ToString(callSuper = true) @ToString(callSuper = true)
public class FileConfigUpdateReqVO extends FileConfigBaseVO { public class FileConfigUpdateReqVO extends FileConfigBaseVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "编号不能为空") @NotNull(message = "编号不能为空")
private Long id; private Long id;
@Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true) @Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "存储配置不能为空") @NotNull(message = "存储配置不能为空")
private Map<String, Object> config; private Map<String, Object> config;

View File

@ -9,28 +9,28 @@ import java.time.LocalDateTime;
@Data @Data
public class FileRespVO { public class FileRespVO {
@Schema(description = "文件编号", required = true, example = "1024") @Schema(description = "文件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "配置编号", required = true, example = "11") @Schema(description = "配置编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long configId; private Long configId;
@Schema(description = "文件路径", required = true, example = "yudao.jpg") @Schema(description = "文件路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao.jpg")
private String path; private String path;
@Schema(description = "原文件名", required = true, example = "yudao.jpg") @Schema(description = "原文件名", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao.jpg")
private String name; private String name;
@Schema(description = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") @Schema(description = "文件 URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/yudao.jpg")
private String url; private String url;
@Schema(description = "文件MIME类型", example = "application/octet-stream") @Schema(description = "文件MIME类型", example = "application/octet-stream")
private String type; private String type;
@Schema(description = "文件大小", example = "2048", required = true) @Schema(description = "文件大小", example = "2048", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer size; private Integer size;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class FileUploadReqVO { public class FileUploadReqVO {
@Schema(description = "文件附件", required = true) @Schema(description = "文件附件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "文件附件不能为空") @NotNull(message = "文件附件不能为空")
private MultipartFile file; private MultipartFile file;

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -11,22 +12,22 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class JobBaseVO { public class JobBaseVO {
@Schema(description = "任务名称", required = true, example = "测试任务") @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试任务")
@NotNull(message = "任务名称不能为空") @NotNull(message = "任务名称不能为空")
private String name; private String name;
@Schema(description = "处理器的参数", example = "yudao") @Schema(description = "处理器的参数", example = "yudao")
private String handlerParam; private String handlerParam;
@Schema(description = "CRON 表达式", required = true, example = "0/10 * * * * ? *") @Schema(description = "CRON 表达式", requiredMode = Schema.RequiredMode.REQUIRED, example = "0/10 * * * * ? *")
@NotNull(message = "CRON 表达式不能为空") @NotNull(message = "CRON 表达式不能为空")
private String cronExpression; private String cronExpression;
@Schema(description = "重试次数", required = true, example = "3") @Schema(description = "重试次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3")
@NotNull(message = "重试次数不能为空") @NotNull(message = "重试次数不能为空")
private Integer retryCount; private Integer retryCount;
@Schema(description = "重试间隔", required = true, example = "1000") @Schema(description = "重试间隔", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
@NotNull(message = "重试间隔不能为空") @NotNull(message = "重试间隔不能为空")
private Integer retryInterval; private Integer retryInterval;

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class JobCreateReqVO extends JobBaseVO { public class JobCreateReqVO extends JobBaseVO {
@Schema(description = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") @Schema(description = "处理器的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "sysUserSessionTimeoutJob")
@NotNull(message = "处理器的名字不能为空") @NotNull(message = "处理器的名字不能为空")
private String handlerName; private String handlerName;

View File

@ -14,17 +14,17 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class JobRespVO extends JobBaseVO { public class JobRespVO extends JobBaseVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "任务状态", required = true, example = "1") @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; private Integer status;
@Schema(description = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") @Schema(description = "处理器的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "sysUserSessionTimeoutJob")
@NotNull(message = "处理器的名字不能为空") @NotNull(message = "处理器的名字不能为空")
private String handlerName; private String handlerName;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class JobUpdateReqVO extends JobBaseVO { public class JobUpdateReqVO extends JobBaseVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "任务编号不能为空") @NotNull(message = "任务编号不能为空")
private Long id; private Long id;

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log; package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -15,22 +16,22 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data @Data
public class JobLogBaseVO { public class JobLogBaseVO {
@Schema(description = "任务编号", required = true, example = "1024") @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "任务编号不能为空") @NotNull(message = "任务编号不能为空")
private Long jobId; private Long jobId;
@Schema(description = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") @Schema(description = "处理器的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "sysUserSessionTimeoutJob")
@NotNull(message = "处理器的名字不能为空") @NotNull(message = "处理器的名字不能为空")
private String handlerName; private String handlerName;
@Schema(description = "处理器的参数", example = "yudao") @Schema(description = "处理器的参数", example = "yudao")
private String handlerParam; private String handlerParam;
@Schema(description = "第几次执行", required = true, example = "1") @Schema(description = "第几次执行", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "第几次执行不能为空") @NotNull(message = "第几次执行不能为空")
private Integer executeIndex; private Integer executeIndex;
@Schema(description = "开始执行时间", required = true) @Schema(description = "开始执行时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始执行时间不能为空") @NotNull(message = "开始执行时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime beginTime; private LocalDateTime beginTime;
@ -42,7 +43,7 @@ public class JobLogBaseVO {
@Schema(description = "执行时长", example = "123") @Schema(description = "执行时长", example = "123")
private Integer duration; private Integer duration;
@Schema(description = "任务状态,参见 JobLogStatusEnum 枚举", required = true, example = "1") @Schema(description = "任务状态,参见 JobLogStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "任务状态不能为空") @NotNull(message = "任务状态不能为空")
private Integer status; private Integer status;

View File

@ -13,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class JobLogRespVO extends JobLogBaseVO { public class JobLogRespVO extends JobLogBaseVO {
@Schema(description = "日志编号", required = true, example = "1024") @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -1,4 +1,5 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog; package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -15,56 +16,56 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data @Data
public class ApiAccessLogBaseVO { public class ApiAccessLogBaseVO {
@Schema(description = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") @Schema(description = "链路追踪编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "66600cb6-7852-11eb-9439-0242ac130002")
@NotNull(message = "链路追踪编号不能为空") @NotNull(message = "链路追踪编号不能为空")
private String traceId; private String traceId;
@Schema(description = "用户编号", required = true, example = "666") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Long userId; private Long userId;
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2") @Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
private Integer userType; private Integer userType;
@Schema(description = "应用名", required = true, example = "dashboard") @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "dashboard")
@NotNull(message = "应用名不能为空") @NotNull(message = "应用名不能为空")
private String applicationName; private String applicationName;
@Schema(description = "请求方法名", required = true, example = "GET") @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET")
@NotNull(message = "请求方法名不能为空") @NotNull(message = "请求方法名不能为空")
private String requestMethod; private String requestMethod;
@Schema(description = "请求地址", required = true, example = "/xxx/yyy") @Schema(description = "请求地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "/xxx/yyy")
@NotNull(message = "请求地址不能为空") @NotNull(message = "请求地址不能为空")
private String requestUrl; private String requestUrl;
@Schema(description = "请求参数") @Schema(description = "请求参数")
private String requestParams; private String requestParams;
@Schema(description = "用户 IP", required = true, example = "127.0.0.1") @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1")
@NotNull(message = "用户 IP不能为空") @NotNull(message = "用户 IP不能为空")
private String userIp; private String userIp;
@Schema(description = "浏览器 UA", required = true, example = "Mozilla/5.0") @Schema(description = "浏览器 UA", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0")
@NotNull(message = "浏览器 UA不能为空") @NotNull(message = "浏览器 UA不能为空")
private String userAgent; private String userAgent;
@Schema(description = "开始请求时间", required = true) @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始请求时间不能为空") @NotNull(message = "开始请求时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime beginTime; private LocalDateTime beginTime;
@Schema(description = "结束请求时间", required = true) @Schema(description = "结束请求时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "结束请求时间不能为空") @NotNull(message = "结束请求时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "执行时长", required = true, example = "100") @Schema(description = "执行时长", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
@NotNull(message = "执行时长不能为空") @NotNull(message = "执行时长不能为空")
private Integer duration; private Integer duration;
@Schema(description = "结果码", required = true, example = "0") @Schema(description = "结果码", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
@NotNull(message = "结果码不能为空") @NotNull(message = "结果码不能为空")
private Integer resultCode; private Integer resultCode;

View File

@ -13,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ApiAccessLogRespVO extends ApiAccessLogBaseVO { public class ApiAccessLogRespVO extends ApiAccessLogBaseVO {
@Schema(description = "日志主键", required = true, example = "1024") @Schema(description = "日志主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -15,80 +15,80 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data @Data
public class ApiErrorLogBaseVO { public class ApiErrorLogBaseVO {
@Schema(description = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") @Schema(description = "链路追踪编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "66600cb6-7852-11eb-9439-0242ac130002")
@NotNull(message = "链路追踪编号不能为空") @NotNull(message = "链路追踪编号不能为空")
private String traceId; private String traceId;
@Schema(description = "用户编号", required = true, example = "666") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Integer userId; private Integer userId;
@Schema(description = "用户类型", required = true, example = "1") @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
private Integer userType; private Integer userType;
@Schema(description = "应用名", required = true, example = "dashboard") @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "dashboard")
@NotNull(message = "应用名不能为空") @NotNull(message = "应用名不能为空")
private String applicationName; private String applicationName;
@Schema(description = "请求方法名", required = true, example = "GET") @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET")
@NotNull(message = "请求方法名不能为空") @NotNull(message = "请求方法名不能为空")
private String requestMethod; private String requestMethod;
@Schema(description = "请求地址", required = true, example = "/xx/yy") @Schema(description = "请求地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "/xx/yy")
@NotNull(message = "请求地址不能为空") @NotNull(message = "请求地址不能为空")
private String requestUrl; private String requestUrl;
@Schema(description = "请求参数", required = true) @Schema(description = "请求参数", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "请求参数不能为空") @NotNull(message = "请求参数不能为空")
private String requestParams; private String requestParams;
@Schema(description = "用户 IP", required = true, example = "127.0.0.1") @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1")
@NotNull(message = "用户 IP不能为空") @NotNull(message = "用户 IP不能为空")
private String userIp; private String userIp;
@Schema(description = "浏览器 UA", required = true, example = "Mozilla/5.0") @Schema(description = "浏览器 UA", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0")
@NotNull(message = "浏览器 UA不能为空") @NotNull(message = "浏览器 UA不能为空")
private String userAgent; private String userAgent;
@Schema(description = "异常发生时间", required = true) @Schema(description = "异常发生时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生时间不能为空") @NotNull(message = "异常发生时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime exceptionTime; private LocalDateTime exceptionTime;
@Schema(description = "异常名", required = true) @Schema(description = "异常名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常名不能为空") @NotNull(message = "异常名不能为空")
private String exceptionName; private String exceptionName;
@Schema(description = "异常导致的消息", required = true) @Schema(description = "异常导致的消息", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常导致的消息不能为空") @NotNull(message = "异常导致的消息不能为空")
private String exceptionMessage; private String exceptionMessage;
@Schema(description = "异常导致的根消息", required = true) @Schema(description = "异常导致的根消息", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常导致的根消息不能为空") @NotNull(message = "异常导致的根消息不能为空")
private String exceptionRootCauseMessage; private String exceptionRootCauseMessage;
@Schema(description = "异常的栈轨迹", required = true) @Schema(description = "异常的栈轨迹", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常的栈轨迹不能为空") @NotNull(message = "异常的栈轨迹不能为空")
private String exceptionStackTrace; private String exceptionStackTrace;
@Schema(description = "异常发生的类全名", required = true) @Schema(description = "异常发生的类全名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的类全名不能为空") @NotNull(message = "异常发生的类全名不能为空")
private String exceptionClassName; private String exceptionClassName;
@Schema(description = "异常发生的类文件", required = true) @Schema(description = "异常发生的类文件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的类文件不能为空") @NotNull(message = "异常发生的类文件不能为空")
private String exceptionFileName; private String exceptionFileName;
@Schema(description = "异常发生的方法名", required = true) @Schema(description = "异常发生的方法名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的方法名不能为空") @NotNull(message = "异常发生的方法名不能为空")
private String exceptionMethodName; private String exceptionMethodName;
@Schema(description = "异常发生的方法所在行", required = true) @Schema(description = "异常发生的方法所在行", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的方法所在行不能为空") @NotNull(message = "异常发生的方法所在行不能为空")
private Integer exceptionLineNumber; private Integer exceptionLineNumber;
@Schema(description = "处理状态", required = true, example = "0") @Schema(description = "处理状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
@NotNull(message = "处理状态不能为空") @NotNull(message = "处理状态不能为空")
private Integer processStatus; private Integer processStatus;

View File

@ -13,13 +13,13 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ApiErrorLogRespVO extends ApiErrorLogBaseVO { public class ApiErrorLogRespVO extends ApiErrorLogBaseVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer id; private Integer id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "处理时间", required = true) @Schema(description = "处理时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime processTime; private LocalDateTime processTime;
@Schema(description = "处理用户编号", example = "233") @Schema(description = "处理用户编号", example = "233")

View File

@ -14,22 +14,22 @@ import java.time.Duration;
@AllArgsConstructor @AllArgsConstructor
public class RedisKeyDefineRespVO { public class RedisKeyDefineRespVO {
@Schema(description = "Key 模板", required = true, example = "login_user:%s") @Schema(description = "Key 模板", requiredMode = Schema.RequiredMode.REQUIRED, example = "login_user:%s")
private String keyTemplate; private String keyTemplate;
@Schema(description = "Key 类型的枚举", required = true, example = "String") @Schema(description = "Key 类型的枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "String")
private RedisKeyDefine.KeyTypeEnum keyType; private RedisKeyDefine.KeyTypeEnum keyType;
@Schema(description = "Value 类型", required = true, example = "java.lang.String") @Schema(description = "Value 类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "java.lang.String")
private Class<?> valueType; private Class<?> valueType;
@Schema(description = "超时类型", required = true, example = "1") @Schema(description = "超时类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private RedisKeyDefine.TimeoutTypeEnum timeoutType; private RedisKeyDefine.TimeoutTypeEnum timeoutType;
@Schema(description = "过期时间,单位:毫秒", required = true, example = "1024") @Schema(description = "过期时间,单位:毫秒", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Duration timeout; private Duration timeout;
@Schema(description = "备注", required = true, example = "啦啦啦啦~") @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "啦啦啦啦~")
private String memo; private String memo;
} }

View File

@ -9,10 +9,10 @@ import lombok.Data;
@AllArgsConstructor @AllArgsConstructor
public class RedisKeyValueRespVO { public class RedisKeyValueRespVO {
@Schema(description = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String") @Schema(description = "c5f6990767804a928f4bb96ca249febf", requiredMode = Schema.RequiredMode.REQUIRED, example = "String")
private String key; private String key;
@Schema(required = true, example = "String") @Schema(requiredMode = Schema.RequiredMode.REQUIRED, example = "String")
private String value; private String value;
} }

View File

@ -14,13 +14,13 @@ import java.util.Properties;
@AllArgsConstructor @AllArgsConstructor
public class RedisMonitorRespVO { public class RedisMonitorRespVO {
@Schema(description = "Redis info 指令结果,具体字段,查看 Redis 文档", required = true) @Schema(description = "Redis info 指令结果,具体字段,查看 Redis 文档", requiredMode = Schema.RequiredMode.REQUIRED)
private Properties info; private Properties info;
@Schema(description = "Redis key 数量", required = true, example = "1024") @Schema(description = "Redis key 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long dbSize; private Long dbSize;
@Schema(description = "CommandStat 数组", required = true) @Schema(description = "CommandStat 数组", requiredMode = Schema.RequiredMode.REQUIRED)
private List<CommandStat> commandStats; private List<CommandStat> commandStats;
@Schema(description = "Redis 命令统计结果") @Schema(description = "Redis 命令统计结果")
@ -29,13 +29,13 @@ public class RedisMonitorRespVO {
@AllArgsConstructor @AllArgsConstructor
public static class CommandStat { public static class CommandStat {
@Schema(description = "Redis 命令", required = true, example = "get") @Schema(description = "Redis 命令", requiredMode = Schema.RequiredMode.REQUIRED, example = "get")
private String command; private String command;
@Schema(description = "调用次数", required = true, example = "1024") @Schema(description = "调用次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long calls; private Long calls;
@Schema(description = "消耗 CPU 秒数", required = true, example = "666") @Schema(description = "消耗 CPU 秒数", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
private Long usec; private Long usec;
} }

View File

@ -10,19 +10,19 @@ import javax.validation.constraints.*;
@Data @Data
public class TestDemoBaseVO { public class TestDemoBaseVO {
@Schema(description = "名字", required = true) @Schema(description = "名字", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "名字不能为空") @NotNull(message = "名字不能为空")
private String name; private String name;
@Schema(description = "状态", required = true) @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "状态不能为空") @NotNull(message = "状态不能为空")
private Integer status; private Integer status;
@Schema(description = "类型", required = true) @Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "类型不能为空") @NotNull(message = "类型不能为空")
private Integer type; private Integer type;
@Schema(description = "分类", required = true) @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "分类不能为空") @NotNull(message = "分类不能为空")
private Integer category; private Integer category;

View File

@ -10,10 +10,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class TestDemoRespVO extends TestDemoBaseVO { public class TestDemoRespVO extends TestDemoBaseVO {
@Schema(description = "编号", required = true) @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -9,7 +9,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class TestDemoUpdateReqVO extends TestDemoBaseVO { public class TestDemoUpdateReqVO extends TestDemoBaseVO {
@Schema(description = "编号", required = true) @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "编号不能为空") @NotNull(message = "编号不能为空")
private Long id; private Long id;

View File

@ -1,5 +1,5 @@
## 提供给 baseVO、createVO、updateVO 生成字段 ## 提供给 baseVO、createVO、updateVO 生成字段
@Schema(description = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end) @Schema(description = "${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != ""), example = "${column.example}"#end)
#if (!${column.nullable})## 判断 @NotEmpty 和 @NotNull 注解 #if (!${column.nullable})## 判断 @NotEmpty 和 @NotNull 注解
#if (${field.fieldType} == 'String') #if (${field.fieldType} == 'String')
@NotEmpty(message = "${column.columnComment}不能为空") @NotEmpty(message = "${column.columnComment}不能为空")

View File

@ -17,7 +17,7 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO extends ${sceneEnu
#foreach ($column in $columns) #foreach ($column in $columns)
#if (${column.listOperationResult} && (!${column.createOperation} || !${column.updateOperation}))##不是通用字段 #if (${column.listOperationResult} && (!${column.createOperation} || !${column.updateOperation}))##不是通用字段
@Schema(description = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end) @Schema(description = "${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != ""), example = "${column.example}"#end)
private ${column.javaType} ${column.javaField}; private ${column.javaType} ${column.javaField};
#end #end

View File

@ -12,22 +12,22 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class ProductBrandBaseVO { public class ProductBrandBaseVO {
@Schema(description = "品牌名称", required = true, example = "芋道") @Schema(description = "品牌名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotNull(message = "品牌名称不能为空") @NotNull(message = "品牌名称不能为空")
private String name; private String name;
@Schema(description = "品牌图片", required = true) @Schema(description = "品牌图片", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "品牌图片不能为空") @NotNull(message = "品牌图片不能为空")
private String picUrl; private String picUrl;
@Schema(description = "品牌排序", required = true, example = "1") @Schema(description = "品牌排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "品牌排序不能为空") @NotNull(message = "品牌排序不能为空")
private Integer sort; private Integer sort;
@Schema(description = "品牌描述", example = "描述") @Schema(description = "品牌描述", example = "描述")
private String description; private String description;
@Schema(description = "状态", required = true, example = "0") @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
@NotNull(message = "状态不能为空") @NotNull(message = "状态不能为空")
private Integer status; private Integer status;

View File

@ -13,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductBrandRespVO extends ProductBrandBaseVO { public class ProductBrandRespVO extends ProductBrandBaseVO {
@Schema(description = "品牌编号", required = true, example = "1") @Schema(description = "品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductBrandUpdateReqVO extends ProductBrandBaseVO { public class ProductBrandUpdateReqVO extends ProductBrandBaseVO {
@Schema(description = "品牌编号", required = true, example = "1") @Schema(description = "品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "品牌编号不能为空") @NotNull(message = "品牌编号不能为空")
private Long id; private Long id;

View File

@ -13,25 +13,25 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class ProductCategoryBaseVO { public class ProductCategoryBaseVO {
@Schema(description = "父分类编号", required = true, example = "1") @Schema(description = "父分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "父分类编号不能为空") @NotNull(message = "父分类编号不能为空")
private Long parentId; private Long parentId;
@Schema(description = "分类名称", required = true, example = "办公文具") @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "办公文具")
@NotBlank(message = "分类名称不能为空") @NotBlank(message = "分类名称不能为空")
private String name; private String name;
@Schema(description = "分类图片", required = true) @Schema(description = "分类图片", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "分类图片不能为空") @NotBlank(message = "分类图片不能为空")
private String picUrl; private String picUrl;
@Schema(description = "分类排序", required = true, example = "1") @Schema(description = "分类排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer sort; private Integer sort;
@Schema(description = "分类描述", required = true, example = "描述") @Schema(description = "分类描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "描述")
private String description; private String description;
@Schema(description = "开启状态", required = true, example = "0") @Schema(description = "开启状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
@NotNull(message = "开启状态不能为空") @NotNull(message = "开启状态不能为空")
private Integer status; private Integer status;

View File

@ -13,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductCategoryRespVO extends ProductCategoryBaseVO { public class ProductCategoryRespVO extends ProductCategoryBaseVO {
@Schema(description = "分类编号", required = true, example = "2") @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO { public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO {
@Schema(description = "分类编号", required = true, example = "2") @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "分类编号不能为空") @NotNull(message = "分类编号不能为空")
private Long id; private Long id;

View File

@ -9,10 +9,10 @@ import java.util.List;
@Data @Data
public class ProductPropertyAndValueRespVO { public class ProductPropertyAndValueRespVO {
@Schema(description = "属性项的编号", required = true, example = "1024") @Schema(description = "属性项的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "属性项的名称", required = true, example = "颜色") @Schema(description = "属性项的名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "颜色")
private String name; private String name;
/** /**
@ -24,10 +24,10 @@ public class ProductPropertyAndValueRespVO {
@Data @Data
public static class Value { public static class Value {
@Schema(description = "属性值的编号", required = true, example = "2048") @Schema(description = "属性值的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long id; private Long id;
@Schema(description = "属性值的名称", required = true, example = "红色") @Schema(description = "属性值的名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "红色")
private String name; private String name;
} }

View File

@ -12,7 +12,7 @@ import javax.validation.constraints.NotBlank;
@Data @Data
public class ProductPropertyBaseVO { public class ProductPropertyBaseVO {
@Schema(description = "名称", required = true, example = "颜色") @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "颜色")
@NotBlank(message = "名称不能为空") @NotBlank(message = "名称不能为空")
private String name; private String name;

View File

@ -20,7 +20,7 @@ public class ProductPropertyPageReqVO extends PageParam {
@Schema(description = "名称", example = "颜色") @Schema(description = "名称", example = "颜色")
private String name; private String name;
@Schema(description = "状态", required = true, example = "1") @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; private Integer status;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

View File

@ -13,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductPropertyRespVO extends ProductPropertyBaseVO { public class ProductPropertyRespVO extends ProductPropertyBaseVO {
@Schema(description = "编号", required = true, example = "1024") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO { public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO {
@Schema(description = "主键", required = true, example = "1") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "主键不能为空") @NotNull(message = "主键不能为空")
private Long id; private Long id;

View File

@ -13,11 +13,11 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class ProductPropertyValueBaseVO { public class ProductPropertyValueBaseVO {
@Schema(description = "属性项的编号", required = true, example = "1024") @Schema(description = "属性项的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "属性项的编号不能为空") @NotNull(message = "属性项的编号不能为空")
private Long propertyId; private Long propertyId;
@Schema(description = "名称", required = true, example = "红色") @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "红色")
@NotEmpty(message = "名称名字不能为空") @NotEmpty(message = "名称名字不能为空")
private String name; private String name;

View File

@ -7,16 +7,16 @@ import lombok.Data;
@Data @Data
public class ProductPropertyValueDetailRespVO { public class ProductPropertyValueDetailRespVO {
@Schema(description = "属性的编号", required = true, example = "1") @Schema(description = "属性的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long propertyId; private Long propertyId;
@Schema(description = "属性的名称", required = true, example = "颜色") @Schema(description = "属性的名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "颜色")
private String propertyName; private String propertyName;
@Schema(description = "属性值的编号", required = true, example = "1024") @Schema(description = "属性值的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long valueId; private Long valueId;
@Schema(description = "属性值的名称", required = true, example = "红色") @Schema(description = "属性值的名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "红色")
private String valueName; private String valueName;
} }

View File

@ -18,7 +18,7 @@ public class ProductPropertyValuePageReqVO extends PageParam {
@Schema(description = "名称", example = "红色") @Schema(description = "名称", example = "红色")
private String name; private String name;
@Schema(description = "状态", required = true, example = "1") @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; private Integer status;
} }

View File

@ -13,7 +13,7 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO { public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO {
@Schema(description = "编号", required = true, example = "10") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
private Long id; private Long id;
@Schema(description = "创建时间") @Schema(description = "创建时间")

View File

@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO { public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO {
@Schema(description = "主键", required = true, example = "1024") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "主键不能为空") @NotNull(message = "主键不能为空")
private Long id; private Long id;

View File

@ -17,11 +17,11 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class ProductSkuBaseVO { public class ProductSkuBaseVO {
@Schema(description = "商品 SKU 名字", required = true, example = "芋道") @Schema(description = "商品 SKU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "商品 SKU 名字不能为空") @NotEmpty(message = "商品 SKU 名字不能为空")
private String name; private String name;
@Schema(description = "销售价格,单位:分", required = true, example = "1024") @Schema(description = "销售价格,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "销售价格,单位:分不能为空") @NotNull(message = "销售价格,单位:分不能为空")
private Integer price; private Integer price;
@ -34,16 +34,16 @@ public class ProductSkuBaseVO {
@Schema(description = "条形码", example = "haha") @Schema(description = "条形码", example = "haha")
private String barCode; private String barCode;
@Schema(description = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png") @Schema(description = "图片地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
@NotNull(message = "图片地址不能为空") @NotNull(message = "图片地址不能为空")
private String picUrl; private String picUrl;
@Schema(description = "SKU 状态", required = true, example = "1") @Schema(description = "SKU 状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "SKU 状态不能为空") @NotNull(message = "SKU 状态不能为空")
@InEnum(CommonStatusEnum.class) @InEnum(CommonStatusEnum.class)
private Integer status; private Integer status;
@Schema(description = "库存", required = true, example = "1") @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "库存不能为空") @NotNull(message = "库存不能为空")
private Integer stock; private Integer stock;
@ -62,11 +62,11 @@ public class ProductSkuBaseVO {
@NoArgsConstructor @NoArgsConstructor
public static class Property { public static class Property {
@Schema(description = "属性编号", required = true, example = "1") @Schema(description = "属性编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "属性编号不能为空") @NotNull(message = "属性编号不能为空")
private Long propertyId; private Long propertyId;
@Schema(description = "属性值编号", required = true, example = "1024") @Schema(description = "属性值编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "属性值编号不能为空") @NotNull(message = "属性值编号不能为空")
private Long valueId; private Long valueId;

View File

@ -7,24 +7,24 @@ import lombok.Data;
@Data @Data
public class ProductSkuOptionRespVO { public class ProductSkuOptionRespVO {
@Schema(description = "主键", required = true, example = "1024") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "商品 SKU 名字", example = "红色") @Schema(description = "商品 SKU 名字", example = "红色")
private String name; private String name;
@Schema(description = "销售价格", required = true, example = "100") @Schema(description = "销售价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
private String price; private String price;
@Schema(description = "库存", required = true, example = "100") @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
private Integer stock; private Integer stock;
// ========== 商品 SPU 信息 ========== // ========== 商品 SPU 信息 ==========
@Schema(description = "商品 SPU 编号", required = true, example = "1") @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long spuId; private Long spuId;
@Schema(description = "商品 SPU 名字", required = true, example = "iPhone 11") @Schema(description = "商品 SPU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "iPhone 11")
private String spuName; private String spuName;
} }

View File

@ -14,7 +14,7 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductSkuRespVO extends ProductSkuBaseVO { public class ProductSkuRespVO extends ProductSkuBaseVO {
@Schema(description = "主键", required = true, example = "1024") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "创建时间") @Schema(description = "创建时间")

View File

@ -17,7 +17,7 @@ import java.util.List;
@Data @Data
public class ProductSpuBaseVO { public class ProductSpuBaseVO {
@Schema(description = "商品名称", required = true, example = "芋道") @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "商品名称不能为空") @NotEmpty(message = "商品名称不能为空")
private String name; private String name;
@ -27,40 +27,40 @@ public class ProductSpuBaseVO {
@Schema(description = "促销语", example = "好吃!") @Schema(description = "促销语", example = "好吃!")
private String sellPoint; private String sellPoint;
@Schema(description = "商品详情", required = true, example = "我是商品描述") @Schema(description = "商品详情", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是商品描述")
@NotNull(message = "商品详情不能为空") @NotNull(message = "商品详情不能为空")
private String description; private String description;
@Schema(description = "商品分类编号", required = true, example = "1") @Schema(description = "商品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "商品分类编号不能为空") @NotNull(message = "商品分类编号不能为空")
private Long categoryId; private Long categoryId;
@Schema(description = "商品品牌编号", example = "1") @Schema(description = "商品品牌编号", example = "1")
private Long brandId; private Long brandId;
@Schema(description = "商品图片的数组", required = true) @Schema(description = "商品图片的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "商品图片的数组不能为空") @NotNull(message = "商品图片的数组不能为空")
private List<String> picUrls; private List<String> picUrls;
@Schema(description = "商品视频", required = true) @Schema(description = "商品视频", requiredMode = Schema.RequiredMode.REQUIRED)
private String videoUrl; private String videoUrl;
@Schema(description = "排序字段", required = true, example = "1") @Schema(description = "排序字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer sort; private Integer sort;
@Schema(description = "商品状态", required = true, example = "1") @Schema(description = "商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "商品状态不能为空") @NotNull(message = "商品状态不能为空")
@InEnum(ProductSpuStatusEnum.class) @InEnum(ProductSpuStatusEnum.class)
private Integer status; private Integer status;
// ========== SKU 相关字段 ========= // ========== SKU 相关字段 =========
@Schema(description = "规格类型", required = true, example = "1") @Schema(description = "规格类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "规格类型不能为空") @NotNull(message = "规格类型不能为空")
@InEnum(ProductSpuSpecTypeEnum.class) @InEnum(ProductSpuSpecTypeEnum.class)
private Integer specType; private Integer specType;
@Schema(description = "是否展示库存", required = true, example = "true") @Schema(description = "是否展示库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否展示库存不能为空") @NotNull(message = "是否展示库存不能为空")
private Boolean showStock; private Boolean showStock;
@ -69,7 +69,7 @@ public class ProductSpuBaseVO {
// ========== 统计相关字段 ========= // ========== 统计相关字段 =========
@Schema(description = "虚拟销量", required = true, example = "1024") @Schema(description = "虚拟销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "虚拟销量不能为空") @NotNull(message = "虚拟销量不能为空")
private Integer virtualSalesCount; private Integer virtualSalesCount;

View File

@ -13,7 +13,7 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductSpuRespVO extends ProductSpuBaseVO { public class ProductSpuRespVO extends ProductSpuBaseVO {
@Schema(description = "主键", required = true, example = "1") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "创建时间") @Schema(description = "创建时间")
@ -21,13 +21,13 @@ public class ProductSpuRespVO extends ProductSpuBaseVO {
// ========== SKU 相关字段 ========= // ========== SKU 相关字段 =========
@Schema(description = "库存", required = true, example = "true") @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
private Integer totalStock; private Integer totalStock;
@Schema(description = " 最小价格,单位使用:分", required = true, example = "1024") @Schema(description = " 最小价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer minPrice; private Integer minPrice;
@Schema(description = "最大价格,单位使用:分", required = true, example = "1024") @Schema(description = "最大价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer maxPrice; private Integer maxPrice;
@Schema(description = "商品销量", example = "1024") @Schema(description = "商品销量", example = "1024")

View File

@ -11,16 +11,16 @@ import lombok.ToString;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductSpuSimpleRespVO extends ProductSpuBaseVO { public class ProductSpuSimpleRespVO extends ProductSpuBaseVO {
@Schema(description = "主键", required = true, example = "1") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "商品名称", required = true, example = "芋道") @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name; private String name;
@Schema(description = " 最小价格,单位使用:分", required = true, example = "1024") @Schema(description = " 最小价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer minPrice; private Integer minPrice;
@Schema(description = "最大价格,单位使用:分", required = true, example = "1024") @Schema(description = "最大价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer maxPrice; private Integer maxPrice;
} }

View File

@ -16,7 +16,7 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductSpuUpdateReqVO extends ProductSpuBaseVO { public class ProductSpuUpdateReqVO extends ProductSpuBaseVO {
@Schema(description = "商品编号", required = true, example = "1") @Schema(description = "商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "商品编号不能为空") @NotNull(message = "商品编号不能为空")
private Long id; private Long id;

Some files were not shown because too many files have changed in this diff Show More