荣誉管理-数据看板:处理年度转换为Timestamp导致的整数类型转换异常;

This commit is contained in:
dd3s_206
2026-09-14 20:44:59 +08:00
parent 1faebf3bc2
commit be9ba54b58
@@ -54,8 +54,7 @@ public class HonorBoardController {
}
Sql sql = Sqls.create("""
SELECT YEAR
( h.grantDate ) as year,
SELECT CAST(YEAR(h.grantDate) AS UNSIGNED) as year,
hbs.`name`
FROM
honor h
@@ -82,7 +81,7 @@ public class HonorBoardController {
SELECT
hbs.`name`,
count( 1 ) AS num,
YEAR ( h.grantDate ) as year
CAST(YEAR(h.grantDate) AS UNSIGNED) as year
FROM
honor h
LEFT JOIN honor_basic_settings hbs ON hbs.id = h.prize
@@ -106,7 +105,7 @@ public class HonorBoardController {
SELECT
hbs.`name`,
count( 1 ) AS num,
YEAR ( h.grantDate ) AS YEAR
CAST(YEAR(h.grantDate) AS UNSIGNED) AS YEAR
FROM
honor h
LEFT JOIN honor_basic_settings hbs ON hbs.id = h.honorLevel