Explorar o código

调试时间转换问题

zhangyang %!s(int64=2) %!d(string=hai) anos
pai
achega
b344d87688

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/PoCollection.java

@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -44,11 +45,13 @@ public class PoCollection extends BaseEntity {
 
     /*展示开始时间*/
     @Excel(name = "开始展示时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date showStart;
 
     /*展示结束时间*/
     @Excel(name = "结束展示时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date showEnd;