diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/UsageStatisticsService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/UsageStatisticsService.cs index ffb49bb9..feedf690 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/UsageStatisticsService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/UsageStatisticsService.cs @@ -155,8 +155,10 @@ public class UsageStatisticsService : ApplicationService, IUsageStatisticsServic // 获取尊享包Token信息 var entities = await _premiumPackageRepository._DbQueryable .Where(x => x.UserId == userId) - .WhereIF(input.IsFree == true, x => x.PurchaseAmount > 0) - .WhereIF(input.IsFree == false, x => x.PurchaseAmount == 0) + .WhereIF(input.IsFree == false, x => x.PurchaseAmount > 0) + .WhereIF(input.IsFree == true, x => x.PurchaseAmount == 0) + .WhereIF(input.StartTime is not null && input.EndTime is not null, + x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) .OrderByDescending(x => x.CreationTime) .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto(total,