[Bug]: 年度报告生成功能无法使用

Fixes #953
This commit is contained in:
xuncha committed 2026-05-14 22:11:32 +08:00
1 parent 046482fccd
commit aa4e3388fc
3 files changed
+77 -6

No files matched your search

+2 -3
View File
@@ -1,6 +1,6 @@
import { parentPort } from 'worker_threads'
import { wcdbService } from './wcdbService'
import { ConfigService } from './config'
import { resolveAccountDir } from './accountDirResolver'
export interface DualReportMessage {
@@ -110,8 +110,7 @@ class DualReportService {
if (!dbPath) return { success: false, error: '未配置数据库路径' }
if (!decryptKey) return { success: false, error: '未配置解密密钥' }
const configService = ConfigService.getInstance()
const accountDir = configService.getAccountDir(dbPath, wxid)
const accountDir = resolveAccountDir(dbPath, wxid)
if (!accountDir) return { success: false, error: '无法找到账号目录' }
const ok = await wcdbService.open(accountDir, decryptKey)
if (!ok) return { success: false, error: 'WCDB 打开失败' }