Ver código fonte

停车入场记录时间格式

xlq 1 mês atrás
pai
commit
b66e42494c

+ 6 - 2
src/main/java/com/qmrb/system/pojo/form/BarninRecordForm.java

@@ -1,6 +1,7 @@
 package com.qmrb.system.pojo.form;
 
 import cn.hutool.core.date.DateTime;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -21,10 +22,13 @@ public class BarninRecordForm {
     private Long barnId;
     private String placeNo;
     private String carNumber;
-    private DateTime inTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date inTime;
     private String inImage;
     private Integer inChannelId;
-    private DateTime outTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date outTime;
     private Integer outChannelId;
     private Integer status;
     /**