fix: update MagicWallet thresholds for consistency with business logic
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m11s

- Adjust MagicWalletEntryThreshold from 1,000,000 to 100,000
- Update MagicWalletDefaultMaxDeposit from 1,000,000,000 to 100,000,000
- Change MagicWalletDefaultMaxCredit from 2,500,000,000 to 250,000,000
- Modify comments in UserOrderService to reflect updated threshold values
This commit is contained in:
masoodafar-web
2026-05-14 03:12:45 +03:30
parent 6e60ca7c25
commit 18a2299d93
2 changed files with 4 additions and 4 deletions
@@ -64,7 +64,7 @@ public static class SystemConstants
/// مقدار ۱٬۰۰۰٬۰۰۰ ریال = ۱۰۰ هزار تومان
/// (Q24: چون قیمت محصولات متفاوت است، موجودی دقیقاً صفر نمی‌شود)
/// </summary>
public const long MagicWalletEntryThreshold = 1_000_000;
public const long MagicWalletEntryThreshold = 100_000;
/// <summary>
/// مقدار پیش‌فرض ضریب جادویی وقتی پکیج یافت نشود (بازگشت به پایه)
@@ -74,12 +74,12 @@ public static class SystemConstants
/// <summary>
/// مقدار پیش‌فرض حداکثر واریز جادویی وقتی پکیج یافت نشود (ریال)
/// </summary>
public const long MagicWalletDefaultMaxDeposit = 1_000_000_000;
public const long MagicWalletDefaultMaxDeposit = 100_000_000;
/// <summary>
/// مقدار پیش‌فرض حداکثر اعتبار جادویی وقتی پکیج یافت نشود (ریال)
/// </summary>
public const long MagicWalletDefaultMaxCredit = 2_500_000_000;
public const long MagicWalletDefaultMaxCredit = 250_000_000;
#endregion
@@ -338,7 +338,7 @@ public class UserOrderService : UserOrderContract.UserOrderContractBase
_context.UserWalletHistories.Add(walletLog);
// ═══ Magic Wallet: Entry / Exit Trigger ═══
// Q24: آستانه <= 1,000,000 ریال به جای == 0 (چون قیمت محصولات متفاوت است)
// Q24: آستانه <= 1,00,000 تومان به جای == 0 (چون قیمت محصولات متفاوت است)
if (wallet.Balance <= SystemConstants.MagicWalletEntryThreshold)
{
var user = await _context.Users