fix(ai-usage): align since date with top-of-hour bucket boundaries

This commit is contained in:
yiling
2026-07-23 11:08:35 +08:00
parent 1c44e5aff7
commit 783daa6d3f
+3
View File
@@ -117,6 +117,9 @@ export class AiUsageService {
break
}
since.setMinutes(0, 0, 0)
if (!params.userId) {
// Return Team-Level Usage (userId = null)
const teamRecords = await prisma.aiUsage.findMany({