Phase 6: Deprecation cleanup + ConfigurationService MagicWallet

- Mark PurchaseGoldenPackage/VerifyGoldenPackagePurchase RPCs as deprecated
- Mark InitiateBasePackagePayment/VerifyBasePackagePayment RPCs as deprecated
- Remove deprecated SystemConstants from GetAllAsDict/GetAllWithDescriptions helpers
- Add MagicWallet per-package values to ConfigurationService (Multiplier, MaxDeposit, MaxCredit)
- All deprecated constants have zero active code usages — safe dead code
This commit is contained in:
masoodafar-web
2026-02-26 01:10:43 +03:30
parent 7176fe44ee
commit d19c569aae
3 changed files with 22 additions and 26 deletions
@@ -146,6 +146,8 @@ public static class SystemConstants
/// <summary>
/// دریافت مقدار به صورت دیکشنری برای نمایش در Admin Panel
/// Note: Per-package values (Price, MaxBalancesPerLeg, etc.) are now read from Package entity
/// via ConfigurationService — only static/global constants remain here.
/// </summary>
public static Dictionary<string, object> GetAllAsDict()
{
@@ -155,26 +157,15 @@ public static class SystemConstants
["Network.AllowOrphanNodes"] = NetworkAllowOrphanNodes,
["Network.MaxChildrenPerLeg"] = NetworkMaxChildrenPerLeg,
// Club
["Club.MembershipGiftValue"] = ClubMembershipGiftValue,
["Club.ActivationFee"] = ClubActivationFee,
// Commission
// Commission (global settings only — per-package limits are in Package entity)
["Commission.CashWithdrawalEnabled"] = CommissionCashWithdrawalEnabled,
["Commission.MinWithdrawalAmount"] = CommissionMinWithdrawalAmount,
["Commission.MaxWeeklyBalancesPerLeg"] = CommissionMaxWeeklyBalancesPerLeg,
["Commission.MaxNetworkLevel"] = CommissionMaxNetworkLevel,
["Commission.CalculationStrategy"] = CommissionCalculationStrategy,
// System
["System.MaintenanceMode"] = SystemMaintenanceMode,
["System.EnableAuditLog"] = SystemEnableAuditLog,
// Magic Wallet
["MagicWallet.Multiplier"] = MagicWalletMultiplier,
["MagicWallet.MaxDeposit"] = MagicWalletMaxDeposit,
["MagicWallet.MaxCredit"] = MagicWalletMaxCredit,
// Shop
["Shop.VAT"] = ShopVAT,
["Shop.VATEnabled"] = ShopVATEnabled
@@ -183,6 +174,7 @@ public static class SystemConstants
/// <summary>
/// دریافت لیست تنظیمات با توضیحات
/// Note: Per-package values are served from Package entity via ConfigurationService.
/// </summary>
public static List<(string Key, object Value, string Description)> GetAllWithDescriptions()
{
@@ -192,26 +184,15 @@ public static class SystemConstants
("Network.AllowOrphanNodes", NetworkAllowOrphanNodes, "اجازه حذف والدین که فرزند دارند"),
("Network.MaxChildrenPerLeg", NetworkMaxChildrenPerLeg, "حداکثر تعداد فرزند مستقیم در هر پا"),
// Club
("Club.MembershipGiftValue", ClubMembershipGiftValue, "مبلغ هدیه حق عضویت باشگاه (ریال)"),
("Club.ActivationFee", ClubActivationFee, "هزینه فعال‌سازی عضویت باشگاه (ریال)"),
// Commission
// Commission (global settings only)
("Commission.CashWithdrawalEnabled", CommissionCashWithdrawalEnabled, "امکان برداشت نقدی فعال باشد"),
("Commission.MinWithdrawalAmount", CommissionMinWithdrawalAmount, "حداقل مبلغ برداشت (ریال)"),
("Commission.MaxWeeklyBalancesPerLeg", CommissionMaxWeeklyBalancesPerLeg, "سقف تعادل هفتگی برای هر دست"),
("Commission.MaxNetworkLevel", CommissionMaxNetworkLevel, "حداکثر عمق شبکه برای محاسبه کمیسیون"),
("Commission.CalculationStrategy", CommissionCalculationStrategy, "روش محاسبه (ORM/SP)"),
// System
("System.MaintenanceMode", SystemMaintenanceMode, "حالت تعمیر و نگهداری سیستم"),
("System.EnableAuditLog", SystemEnableAuditLog, "فعال‌سازی لاگ تغییرات"),
// Magic Wallet
("MagicWallet.Multiplier", MagicWalletMultiplier, "ضریب شارژ کیف‌پول جادویی (×2.5)"),
("MagicWallet.MaxDeposit", MagicWalletMaxDeposit, "سقف واریز هر دور جادویی (ریال)"),
("MagicWallet.MaxCredit", MagicWalletMaxCredit, "سقف اعتبار هر دور جادویی (ریال)"),
// Shop
("Shop.VAT", ShopVAT, "مالیات بر ارزش افزوده"),
("Shop.VATEnabled", ShopVATEnabled, "مالیات فعال است؟")