荣誉管理-数据看板:处理年度转换为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(""" Sql sql = Sqls.create("""
SELECT YEAR SELECT CAST(YEAR(h.grantDate) AS UNSIGNED) as year,
( h.grantDate ) as year,
hbs.`name` hbs.`name`
FROM FROM
honor h honor h
@@ -82,7 +81,7 @@ public class HonorBoardController {
SELECT SELECT
hbs.`name`, hbs.`name`,
count( 1 ) AS num, count( 1 ) AS num,
YEAR ( h.grantDate ) as year CAST(YEAR(h.grantDate) AS UNSIGNED) as year
FROM FROM
honor h honor h
LEFT JOIN honor_basic_settings hbs ON hbs.id = h.prize LEFT JOIN honor_basic_settings hbs ON hbs.id = h.prize
@@ -106,7 +105,7 @@ public class HonorBoardController {
SELECT SELECT
hbs.`name`, hbs.`name`,
count( 1 ) AS num, count( 1 ) AS num,
YEAR ( h.grantDate ) AS YEAR CAST(YEAR(h.grantDate) AS UNSIGNED) AS YEAR
FROM FROM
honor h honor h
LEFT JOIN honor_basic_settings hbs ON hbs.id = h.honorLevel LEFT JOIN honor_basic_settings hbs ON hbs.id = h.honorLevel