feat: 支持尊享包渠道

This commit is contained in:
ccnetcore
2025-12-31 00:02:25 +08:00
committed by Gsh
parent e4621d9049
commit 33d28a8cb0
28 changed files with 1666 additions and 34 deletions

View File

@@ -65,7 +65,12 @@ public class OpenApiService : ApplicationService
await _aiBlacklistManager.VerifiyAiBlacklist(userId);
//如果是尊享包服务,需要校验是是否尊享包足够
if (PremiumPackageConst.ModeIds.Contains(input.Model))
var isPremium = await _aiModelRepository._DbQueryable
.Where(x => x.ModelId == input.Model)
.Select(x => x.IsPremium)
.FirstAsync();
if (isPremium)
{
// 检查尊享token包用量
var availableTokens = await _premiumPackageManager.GetAvailableTokensAsync(userId);