feat: 一些朋友圈功能的优化实现

This commit is contained in:
cc
2026-01-23 23:33:06 +08:00
parent bdbb85175a
commit a100f4ef97
8 changed files with 1127 additions and 562 deletions

View File

@@ -3367,6 +3367,19 @@ class ChatService {
}
return parsed
}
async execQuery(kind: string, path: string | null, sql: string): Promise<{ success: boolean; rows?: any[]; error?: string }> {
try {
const connectResult = await this.ensureConnected()
if (!connectResult.success) {
return { success: false, error: connectResult.error || '数据库未连接' }
}
return wcdbService.execQuery(kind, path, sql)
} catch (e) {
console.error('ChatService: 执行自定义查询失败:', e)
return { success: false, error: String(e) }
}
}
}
export const chatService = new ChatService()