From 5df9beddb0e8f7bca303a50f59b960d3d8f1346a Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 16 十月 2024 10:05:15 +0800
Subject: [PATCH] 修改bug
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java
index 80db2a1..2e56889 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/DataUpdateHandlerConfig.java
@@ -7,6 +7,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
import java.util.Date;
/**
@@ -33,8 +35,8 @@
*/
@Override
public void insertFill(MetaObject metaObject) {
- this.setFieldValByName("createTime", new Date(), metaObject);
- this.setFieldValByName("updateTime", new Date(), metaObject);
+ this.setFieldValByName("createTime", LocalDateTime.now(), metaObject);
+ this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject);
}
/**
@@ -44,6 +46,6 @@
*/
@Override
public void updateFill(MetaObject metaObject) {
- this.setFieldValByName("updateTime", new Date(), metaObject);
+ this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject);
}
}
--
Gitblit v1.7.1