浏览代码

时间转换

plf 5 年之前
父节点
当前提交
cccb88643d
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      base-module/src/main/java/com/caimei/module/base/entity/po/Product.java

+ 3 - 0
base-module/src/main/java/com/caimei/module/base/entity/po/Product.java

@@ -1,5 +1,6 @@
 package com.caimei.module.base.entity.po;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -426,11 +427,13 @@ public class Product implements Serializable {
     /**
      * 活动开始时间
      */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date beginTime;
 
     /**
      * 活动结束时间
      */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date endTime;
 
     private Integer shopIndexModuleID;