Explorar o código

时间格式化

wangyangyang %!s(int64=4) %!d(string=hai) anos
pai
achega
db479aa7dc

+ 2 - 2
sms_water/src/main/java/com/huaxu/entity/DeviceAttributeEntity.java

@@ -66,7 +66,7 @@ public class DeviceAttributeEntity  implements Serializable {
     @ApiModelProperty(value = "数据删除标记")
     private Integer status;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间", example = "2020-12-12 12:12:12")
     private Date dateCreate;
 
@@ -81,7 +81,7 @@ public class DeviceAttributeEntity  implements Serializable {
     /**
      * 更新时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "更新时间", example = "2020-12-12 12:12:12")
     private Date dateUpdate;
 

+ 2 - 2
sms_water/src/main/java/com/huaxu/entity/DeviceAttributeSpecsEntity.java

@@ -40,7 +40,7 @@ public class DeviceAttributeSpecsEntity  implements Serializable{
     @ApiModelProperty(value = "数据删除标记")
     private Integer status;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间",example = "2020-12-12 12:12:12")
     private Date dateCreate;
 
@@ -51,7 +51,7 @@ public class DeviceAttributeSpecsEntity  implements Serializable{
     @ApiModelProperty(value = "更新者")
     private String updateBy;
     /** 更新时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "更新时间",example = "2020-12-12 12:12:12")
     private Date dateUpdate;
 

+ 2 - 2
sms_water/src/main/java/com/huaxu/entity/DeviceTypeEntity.java

@@ -49,7 +49,7 @@ public class DeviceTypeEntity implements Serializable {
     @ApiModelProperty(value = "数据删除标记")
     private Integer status;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间",example = "2020-12-12 12:12:12")
     private Date dateCreate;
 
@@ -60,7 +60,7 @@ public class DeviceTypeEntity implements Serializable {
     @ApiModelProperty(value = "更新者")
     private String updateBy;
     /** 更新时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "更新时间",example = "2020-12-12 12:12:12")
     private Date dateUpdate;
 

+ 4 - 4
sms_water/src/main/java/com/huaxu/entity/SceneEntity.java

@@ -79,8 +79,8 @@ public class SceneEntity implements Serializable {
     private Long enableState;
 
     /** 投运时间 */
-    @ApiModelProperty(value = "投运时间",example = "2020-12-12 12:12:12")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @ApiModelProperty(value = "投运时间",example = "2020-12-12")
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     private Date runTime;
 
     /** 地址 */
@@ -100,7 +100,7 @@ public class SceneEntity implements Serializable {
     @ApiModelProperty(value = "数据删除标记")
     private Integer status;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间",example = "2020-12-12 12:12:12")
     private Date dateCreate;
 
@@ -111,7 +111,7 @@ public class SceneEntity implements Serializable {
     @ApiModelProperty(value = "更新者")
     private String updateBy;
     /** 更新时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "更新时间",example = "2020-12-12 12:12:12")
     private Date dateUpdate;
 

+ 2 - 2
sms_water/src/main/java/com/huaxu/entity/SceneTypeEntity.java

@@ -47,7 +47,7 @@ public class SceneTypeEntity implements Serializable {
     @TableLogic
     private Integer status;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间",example = "2020-12-12 12:12:12")
     private Date dateCreate;
 
@@ -59,7 +59,7 @@ public class SceneTypeEntity implements Serializable {
     private String updateBy;
 
     /** 更新时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "2020-12-12 12:12:12")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @ApiModelProperty(value = "更新时间",example = "2020-12-12 12:12:12")
     private Date dateUpdate;