Browse Source

add timezone

master
RuoYi 1 week ago
parent
commit
e728c37b64
  1. 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
  2. 2
      ruoyi-generator/src/main/resources/vm/java/domain.java.vm
  3. 2
      ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm

4
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

@ -25,14 +25,14 @@ public class BaseEntity implements Serializable
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
/** 备注 */

2
ruoyi-generator/src/main/resources/vm/java/domain.java.vm

@ -40,7 +40,7 @@ public class ${ClassName} extends ${Entity}
#if($parentheseIndex != -1)
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
#elseif($column.javaType == 'Date')
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
#else
@Excel(name = "${comment}")

2
ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm

@ -31,7 +31,7 @@ public class ${subClassName} extends BaseEntity
#if($parentheseIndex != -1)
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
#elseif($column.javaType == 'Date')
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
#else
@Excel(name = "${comment}")

Loading…
Cancel
Save