From 79433b12382b37618d9afda0add7a8a91dd96324 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 16:56:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcPartyActivityDTO.java | 6 ++++-- .../main/java/com/epmet/dto/form/PartyActivityFormDTO.java | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java index d09b657ee0..fc0d7555e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -18,7 +18,9 @@ package com.epmet.dto; import com.epmet.commons.tools.validator.group.AddGroup; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -49,7 +51,6 @@ public class IcPartyActivityDTO implements Serializable { /** * 组织ID */ - @NotBlank(message = "agencyId不能为空",groups = AddGroup.class) private String agencyId; /** @@ -95,7 +96,8 @@ public class IcPartyActivityDTO implements Serializable { /** * 活动时间 */ - @NotBlank(message = "活动时间不能为空",groups = AddGroup.class) + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date activityTime; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java index 2053b99d0f..40ac5563ac 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -18,7 +19,9 @@ public class PartyActivityFormDTO implements Serializable { private String agencyId; private String unitId; private String title; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date startTime; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date endTime; private String serviceMatter; private Integer pageNo;