From 8ef61448a1814e9d5030c3c49952fafa14e4d8d4 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Sun, 3 Nov 2024 17:20:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=86=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../heritage/model/dto/coupon/CouponAddRequest.java | 5 ++--- .../heritage/model/dto/coupon/CouponUpdateRequest.java | 5 ++--- .../java/com/cultural/heritage/model/entity/Coupon.java | 7 ++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java index 5075c50..f2744be 100644 --- a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java +++ b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java @@ -4,7 +4,6 @@ import lombok.Data; import java.io.Serial; import java.io.Serializable; -import java.util.Date; @Data public class CouponAddRequest implements Serializable { @@ -52,13 +51,13 @@ public class CouponAddRequest implements Serializable { /** * 有效开始日期 */ - private Date startTime; + private String startTime; /** * 有效截止日期 */ - private Date endTime; + private String endTime; /** diff --git a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java index fbe50c3..5f778b9 100644 --- a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java +++ b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java @@ -4,7 +4,6 @@ import lombok.Data; import java.io.Serial; import java.io.Serializable; -import java.util.Date; @Data public class CouponUpdateRequest implements Serializable { @@ -52,12 +51,12 @@ public class CouponUpdateRequest implements Serializable { /** * 有效开始日期 */ - private Date startTime; + private String startTime; /** * 有效截止日期 */ - private Date endTime; + private String endTime; /** diff --git a/src/main/java/com/cultural/heritage/model/entity/Coupon.java b/src/main/java/com/cultural/heritage/model/entity/Coupon.java index 65684e2..26bac2b 100644 --- a/src/main/java/com/cultural/heritage/model/entity/Coupon.java +++ b/src/main/java/com/cultural/heritage/model/entity/Coupon.java @@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; import java.io.Serial; import java.io.Serializable; @@ -74,15 +73,13 @@ public class Coupon implements Serializable { /** * 有效开始日期 */ - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTime; + private String startTime; /** * 有效截止日期 */ - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTime; + private String endTime; /** * 作用范围