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; /** * 作用范围