fix: 修复统计近7天token消耗时角色过滤条件错误
This commit is contained in:
@@ -44,6 +44,7 @@ public class UsageStatisticsService : ApplicationService, IUsageStatisticsServic
|
||||
// 从Message表统计近7天的token消耗
|
||||
var dailyUsage = await _messageRepository._DbQueryable
|
||||
.Where(x => x.UserId == userId)
|
||||
.Where(x => x.Role == "assistant" || x.Role == "system")
|
||||
.Where(x => x.CreationTime >= startDate && x.CreationTime < endDate.AddDays(1))
|
||||
.GroupBy(x => x.CreationTime.Date)
|
||||
.Select(g => new
|
||||
|
||||
Reference in New Issue
Block a user