diff --git a/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/mail/dto/MailTemplateSaveReqDTO.java b/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/mail/dto/MailTemplateSaveReqDTO.java index 57bf935..edcebde 100644 --- a/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/mail/dto/MailTemplateSaveReqDTO.java +++ b/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/mail/dto/MailTemplateSaveReqDTO.java @@ -3,9 +3,6 @@ package org.agt.module.system.api.mail.dto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; - @Schema(description = "管理后台 - 邮件模版创建/修改 Request DTO") @Data public class MailTemplateSaveReqDTO { @@ -14,30 +11,24 @@ public class MailTemplateSaveReqDTO { private Long id; @Schema(description = "模版名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试名字") - @NotNull(message = "名称不能为空") private String name; @Schema(description = "模版编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "test") - @NotNull(message = "模版编号不能为空") private String code; @Schema(description = "发送的邮箱账号编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "发送的邮箱账号编号不能为空") private Long accountId; @Schema(description = "发送人名称", example = "芋头") private String nickname; @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "注册成功") - @NotEmpty(message = "标题不能为空") private String title; @Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,注册成功啦") - @NotEmpty(message = "内容不能为空") private String content; @Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") private Integer status; @Schema(description = "备注", example = "奥特曼") diff --git a/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/notify/dto/NotifyTemplateSaveReqDTO.java b/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/notify/dto/NotifyTemplateSaveReqDTO.java index 3bb640a..c75f6c8 100644 --- a/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/notify/dto/NotifyTemplateSaveReqDTO.java +++ b/agt-module-system/agt-module-system-api/src/main/java/org/agt/module/system/api/notify/dto/NotifyTemplateSaveReqDTO.java @@ -1,12 +1,9 @@ package org.agt.module.system.api.notify.dto; -import org.agt.framework.common.enums.CommonStatusEnum; -import org.agt.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; - -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; +import org.agt.framework.common.enums.CommonStatusEnum; +import org.agt.framework.common.validation.InEnum; @Schema(description = "管理后台 - 站内信模版创建/修改 Request DTO") @Data @@ -16,27 +13,21 @@ public class NotifyTemplateSaveReqDTO { private Long id; @Schema(description = "模版名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试模版") - @NotEmpty(message = "模版名称不能为空") private String name; @Schema(description = "模版编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "SEND_TEST") - @NotNull(message = "模版编码不能为空") private String code; @Schema(description = "模版类型,对应 system_notify_template_type 字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "模版类型不能为空") private Integer type; @Schema(description = "发送人名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "土豆") - @NotEmpty(message = "发送人名称不能为空") private String nickname; @Schema(description = "模版内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是模版内容") - @NotEmpty(message = "模版内容不能为空") private String content; @Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") private Integer status; diff --git a/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/mail/vo/template/MailTemplateSaveReqVO.java b/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/mail/vo/template/MailTemplateSaveReqVO.java index ffd1691..3a0c0c5 100644 --- a/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/mail/vo/template/MailTemplateSaveReqVO.java +++ b/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/mail/vo/template/MailTemplateSaveReqVO.java @@ -3,9 +3,6 @@ package org.agt.module.system.controller.admin.mail.vo.template; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; - @Schema(description = "管理后台 - 邮件模版创建/修改 Request VO") @Data public class MailTemplateSaveReqVO { @@ -14,30 +11,30 @@ public class MailTemplateSaveReqVO { private Long id; @Schema(description = "模版名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试名字") - @NotNull(message = "名称不能为空") +// @NotNull(message = "名称不能为空") private String name; @Schema(description = "模版编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "test") - @NotNull(message = "模版编号不能为空") +// @NotNull(message = "模版编号不能为空") private String code; @Schema(description = "发送的邮箱账号编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "发送的邮箱账号编号不能为空") +// @NotNull(message = "发送的邮箱账号编号不能为空") private Long accountId; @Schema(description = "发送人名称", example = "芋头") private String nickname; @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "注册成功") - @NotEmpty(message = "标题不能为空") +// @NotEmpty(message = "标题不能为空") private String title; @Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,注册成功啦") - @NotEmpty(message = "内容不能为空") +// @NotEmpty(message = "内容不能为空") private String content; @Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") +// @NotNull(message = "状态不能为空") private Integer status; @Schema(description = "备注", example = "奥特曼") diff --git a/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/notify/vo/template/NotifyTemplateSaveReqVO.java b/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/notify/vo/template/NotifyTemplateSaveReqVO.java index 8cd7ac8..86be3e6 100644 --- a/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/notify/vo/template/NotifyTemplateSaveReqVO.java +++ b/agt-module-system/agt-module-system-server/src/main/java/org/agt/module/system/controller/admin/notify/vo/template/NotifyTemplateSaveReqVO.java @@ -1,12 +1,9 @@ package org.agt.module.system.controller.admin.notify.vo.template; -import org.agt.framework.common.enums.CommonStatusEnum; -import org.agt.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; - -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; +import org.agt.framework.common.enums.CommonStatusEnum; +import org.agt.framework.common.validation.InEnum; @Schema(description = "管理后台 - 站内信模版创建/修改 Request VO") @Data @@ -16,27 +13,27 @@ public class NotifyTemplateSaveReqVO { private Long id; @Schema(description = "模版名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试模版") - @NotEmpty(message = "模版名称不能为空") +// @NotEmpty(message = "模版名称不能为空") private String name; @Schema(description = "模版编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "SEND_TEST") - @NotNull(message = "模版编码不能为空") +// @NotNull(message = "模版编码不能为空") private String code; @Schema(description = "模版类型,对应 system_notify_template_type 字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "模版类型不能为空") +// @NotNull(message = "模版类型不能为空") private Integer type; @Schema(description = "发送人名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "土豆") - @NotEmpty(message = "发送人名称不能为空") +// @NotEmpty(message = "发送人名称不能为空") private String nickname; @Schema(description = "模版内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是模版内容") - @NotEmpty(message = "模版内容不能为空") +// @NotEmpty(message = "模版内容不能为空") private String content; @Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") +// @NotNull(message = "状态不能为空") @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") private Integer status;