gongdecai 1 سال پیش
والد
کامیت
95ec6765ca

+ 12 - 0
unimall-data/pom.xml

@@ -122,6 +122,18 @@
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+		</dependency>
 	</dependencies>
 
 </project>

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/MoneyHis.java

@@ -1,5 +1,6 @@
 package com.iotechn.unimall.data.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
@@ -10,6 +11,8 @@ import lombok.Data;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.util.Date;
 
 /**
@@ -75,6 +78,8 @@ public class MoneyHis extends SuperDO{
     /**  */
     @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
     @TableField("gmt_create")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date gmtCreate;
 
     /**  */

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/SalesSlip.java

@@ -1,5 +1,6 @@
 package com.iotechn.unimall.data.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
@@ -10,6 +11,8 @@ import lombok.Data;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.util.Date;
 
 /**
@@ -90,6 +93,8 @@ public class SalesSlip extends SuperDO{
     /**  */
     @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
     @TableField("gmt_create")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date gmtCreate;
 
     /**  */