From 5055a7ed4de24db06c0db9890ff7e4fba3dd5ccd Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期三, 14 十月 2026 13:54:38 +0800
Subject: [PATCH] fix: 修改查询逻辑以兼容 MySQL 8 的 ONLY_FULL_GROUP_BY 模式,使用 ANY_VALUE() 包裹非聚合列
---
src/main/java/com/ruoyi/framework/config/ApplicationConfig.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java b/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
index 2cc50ba..ecca849 100644
--- a/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
+++ b/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
@@ -16,6 +16,7 @@
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
+import java.text.SimpleDateFormat;
import java.util.TimeZone;
/**
@@ -34,7 +35,7 @@
*/
@Bean
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() {
- return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
+ return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getTimeZone("GMT+8"));
}
@Bean
@@ -59,6 +60,8 @@
new LocalDateSerializer(dateFormatter));
mapper.registerModule(module);
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+ mapper.setTimeZone(TimeZone.getTimeZone("GMT+8"));
+ mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
return mapper;
}
}
--
Gitblit v1.9.3