fix: 修复考勤控制器 DI 解析与班级日期迁移空 SQL

This commit is contained in:
2026-08-05 17:46:11 +08:00
parent 47720a8fcc
commit 1e1e24f0f0
2 changed files with 5 additions and 3 deletions

View File

@@ -139,8 +139,8 @@ export async function normalizeClassDates(
const type = String(column?.type ?? '').toLowerCase();
return !['date', 'datetime', 'timestamp'].includes(type);
});
if (columns.length === 0) return;
});
if (columns.length === 0) return;
const columnText = (column: string) => `CAST(${column} AS CHAR)`;
const firstTenChars = (column: string) => `NULLIF(LEFT(${columnText(column)}, 10), '')`;