feat(Q24+Q26): balance threshold + SP auto-deploy worker
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m25s

Q24: Magic wallet entry/exit trigger now uses Balance <= 1,000,000 Rials
  instead of Balance == 0 (products have varying prices so exact zero
  is unreachable). Added MagicWalletEntryThreshold to SystemConstants.

Q26: StoredProcedureDeploymentService (IHostedService) auto-deploys
  stored procedures on startup via embedded SQL resources + SHA256
  checksum comparison. Creates [CMS].[__StoredProcedureVersions] table
  automatically. Supports GO batch separators.
This commit is contained in:
masoodafar-web
2026-02-27 04:22:24 +03:30
parent 1ac23667e2
commit a1024a3e18
5 changed files with 313 additions and 3 deletions
@@ -58,6 +58,14 @@ public static class SystemConstants
// Per-package magic wallet settings are now in Package entity:
// Package.MagicWalletMultiplier, Package.MagicWalletMaxDeposit, Package.MagicWalletMaxCredit
/// <summary>
/// آستانه ورود/خروج کیف‌پول جادویی (ریال).
/// وقتی موجودی کیف‌پول به این مقدار یا کمتر برسد، تریگر Entry/Exit اجرا می‌شود.
/// مقدار ۱٬۰۰۰٬۰۰۰ ریال = ۱۰۰ هزار تومان
/// (Q24: چون قیمت محصولات متفاوت است، موجودی دقیقاً صفر نمی‌شود)
/// </summary>
public const long MagicWalletEntryThreshold = 1_000_000;
#endregion
#region Shop Settings
@@ -98,6 +106,9 @@ public static class SystemConstants
["System.MaintenanceMode"] = SystemMaintenanceMode,
["System.EnableAuditLog"] = SystemEnableAuditLog,
// Magic Wallet (global threshold)
["MagicWallet.EntryThreshold"] = MagicWalletEntryThreshold,
// Shop
["Shop.VAT"] = ShopVAT,
["Shop.VATEnabled"] = ShopVATEnabled
@@ -125,6 +136,9 @@ public static class SystemConstants
("System.MaintenanceMode", SystemMaintenanceMode, "حالت تعمیر و نگهداری سیستم"),
("System.EnableAuditLog", SystemEnableAuditLog, "فعال‌سازی لاگ تغییرات"),
// Magic Wallet (global threshold)
("MagicWallet.EntryThreshold", MagicWalletEntryThreshold, "آستانه ورود/خروج کیف‌پول جادویی (ریال) — Q24"),
// Shop
("Shop.VAT", ShopVAT, "مالیات بر ارزش افزوده"),
("Shop.VATEnabled", ShopVATEnabled, "مالیات فعال است؟")