From 7d6737479c0a5266f96241641a1be6d7d85412e9 Mon Sep 17 00:00:00 2001 From: xrcoder <53924337@qq.com> Date: Sat, 6 Aug 2022 10:53:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9E=9A=E4=B8=BE=E7=B1=BB?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/notify/vo/message/NotifyMessageBaseVO.java | 12 ++++++++---- .../notify/vo/template/NotifyTemplateBaseVO.java | 11 +++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java index b19480e71..ca77eaccb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java @@ -1,11 +1,14 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; -import javax.validation.constraints.*; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; +import java.util.Date; + import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** @@ -21,6 +24,7 @@ public class NotifyMessageBaseVO { @ApiModelProperty(value = "用户类型", required = true) @NotNull(message = "用户类型不能为空") + @InEnum(value = UserTypeEnum.class, message = "用户类型必须是 {value}") private Integer userType; @ApiModelProperty(value = "标题") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java index 371239455..bff746e14 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; -import javax.validation.constraints.*; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; /** * 站内信模版 Base VO,提供给添加、修改、详细的子 VO 使用 @@ -26,6 +28,7 @@ public class NotifyTemplateBaseVO { @ApiModelProperty(value = "状态:1-启用 0-禁用", required = true) @NotNull(message = "状态:1-启用 0-禁用不能为空") + @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") private String status; @ApiModelProperty(value = "备注")