From 739db0bb71590858eecb5a1081eb85d4fd281d34 Mon Sep 17 00:00:00 2001 From: chenpei Date: Fri, 3 Jul 2026 15:29:33 +0800 Subject: [PATCH] fix: bundle report db driver for survey sync --- lib/performance-survey-report-sync.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/performance-survey-report-sync.ts b/lib/performance-survey-report-sync.ts index 4f9aea41..e56e1c5a 100644 --- a/lib/performance-survey-report-sync.ts +++ b/lib/performance-survey-report-sync.ts @@ -1,5 +1,6 @@ import { randomUUID } from 'crypto' import { prisma } from '@/lib/prisma' +import mssql from 'mssql' type ReportEmployeeRow = { dingtalkUserId?: string | null @@ -556,8 +557,7 @@ function shouldRefreshProfile(profile: { syncedAt?: Date | null; departmentName? } async function getReportPool() { - const imported = await import('mssql') - const sql = (imported.default || imported) as typeof import('mssql') + const sql = mssql as typeof import('mssql') return { sql, pool: await sql.connect(getReportDbConfig() as any),