fix: 修复剩余令牌统计逻辑,增加过期时间判断
This commit is contained in:
@@ -133,7 +133,8 @@ public class PremiumPackageManager : DomainService
|
||||
{
|
||||
return await _premiumPackageRepository._DbQueryable
|
||||
.Where(x => x.UserId == userId && x.IsActive && x.RemainingTokens > 0)
|
||||
.Where(p => p.IsAvailable())
|
||||
.Where(p => p.IsActive)
|
||||
.Where(p => !p.ExpireDateTime.HasValue || p.ExpireDateTime.Value >= DateTime.Now)
|
||||
.SumAsync(p => p.RemainingTokens);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user