F2-F7: نوتیفیکیشن‌ها+نام‌پکیج، ستون پکیج در CSV، مقادیر داینامیک کیف‌پول جادویی، ولیدیتور SystemConstants
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m29s

F2: اضافه شدن packageName به SmsTemplates، IUserNotificationService، UserNotificationService
    - DayaLoan، ClubActivated، CommissionDeposited حالا نام پکیج را نشان می‌دهند
F4: اضافه شدن ستون پکیج به CSV خروجی‌ها
    - commission.proto: package_name در WithdrawalRequestModel
    - manualpayment.proto: package_name در ManualPaymentModel
    - کوئری‌هندلرها UserPackagePurchases لوکاپ اضافه شد
F6: مقادیر داینامیک کیف‌پول جادویی از پکیج
    - userwallet.proto: magic_multiplier + magic_max_credit
    - UserWalletService: پاپیولیت فیلدهای جدید + فالبک به SystemConstants
F7: ولیدیتورها از SystemConstants استفاده می‌کنند
    - WalletMaxSafeAmount (10B ریال) به عنوان حصار ایمنی
    - MagicWalletMinCharge، DiscountWalletMinCharge ثابت‌های مرکزی
    - سقف واقعی per-package در هندلرها اعمال می‌شود
Proto: v0.0.189
This commit is contained in:
masoodafar-web
2026-02-27 08:47:46 +03:30
parent e5bc3a952a
commit 61b7e4f8f2
18 changed files with 129 additions and 33 deletions
@@ -49,6 +49,7 @@ public class UserNotificationService : IUserNotificationService
long userId,
decimal amount,
int weekNumber,
string? packageName = null,
CancellationToken cancellationToken = default)
{
_logger.LogInformation(
@@ -69,14 +70,15 @@ public class UserNotificationService : IUserNotificationService
if (string.IsNullOrEmpty(userFullName)) userFullName = "کاربر عزیز";
var formattedAmount = amount.ToString("N0", new System.Globalization.CultureInfo("fa-IR"));
var packageInfo = !string.IsNullOrEmpty(packageName) ? $" ({packageName})" : "";
// Send Email
if (_emailSettings.Enabled && !string.IsNullOrEmpty(user.Email))
{
var emailSubject = $"واریز کمیسیون هفته {weekNumber}";
var emailSubject = $"واریز کمیسیون هفته {weekNumber}{packageInfo}";
var emailBody = "<div dir='rtl' style='font-family: Tahoma, Arial; text-align: right;'>" +
$"<h2>سلام {userFullName}</h2>" +
$"<p>کمیسیون هفته {weekNumber} شما به مبلغ <strong>{formattedAmount} ریال</strong> به کیف پول شما واریز شد.</p>" +
$"<p>کمیسیون هفته {weekNumber} شما{packageInfo} به مبلغ <strong>{formattedAmount} ریال</strong> به کیف پول شما واریز شد.</p>" +
"<p>از اعتماد شما سپاسگزاریم.</p>" +
"<hr/>" +
"<p style='color: #666; font-size: 12px;'>FourSat - سیستم مدیریت باشگاه مشتریان</p>" +
@@ -95,7 +97,7 @@ public class UserNotificationService : IUserNotificationService
{
await SendSmsAsync(
phoneNumber: user.Mobile,
message: $"سلام {userFullName}\nکمیسیون هفته {weekNumber} شما به مبلغ {formattedAmount} ریال واریز شد.\nFourSat",
message: $"سلام {userFullName}\nکمیسیون هفته {weekNumber} شما{packageInfo} به مبلغ {formattedAmount} ریال واریز شد.\nFourSat",
cancellationToken: cancellationToken);
}
@@ -109,6 +111,7 @@ public class UserNotificationService : IUserNotificationService
public async Task SendClubActivationNotificationAsync(
long userId,
string? packageName = null,
CancellationToken cancellationToken = default)
{
_logger.LogInformation("🎉 Sending club activation notification: User={UserId}", userId);
@@ -120,6 +123,7 @@ public class UserNotificationService : IUserNotificationService
var userFullName = $"{user.FirstName} {user.LastName}".Trim();
if (string.IsNullOrEmpty(userFullName)) userFullName = "کاربر عزیز";
var packageInfo = !string.IsNullOrEmpty(packageName) ? $" با {packageName}" : "";
// Send Email
if (_emailSettings.Enabled && !string.IsNullOrEmpty(user.Email))
@@ -127,7 +131,7 @@ public class UserNotificationService : IUserNotificationService
var emailSubject = "فعال‌سازی باشگاه مشتریان FourSat";
var emailBody = "<div dir='rtl' style='font-family: Tahoma, Arial; text-align: right;'>" +
$"<h2>تبریک {userFullName}!</h2>" +
"<p>عضویت شما در <strong>باشگاه مشتریان FourSat</strong> با موفقیت فعال شد.</p>" +
$"<p>عضویت شما در <strong>باشگاه مشتریان FourSat</strong>{packageInfo} با موفقیت فعال شد.</p>" +
"<p>از این پس می‌توانید از مزایای ویژه باشگاه بهره‌مند شوید.</p>" +
"<hr/>" +
"<p style='color: #666; font-size: 12px;'>FourSat - سیستم مدیریت باشگاه مشتریان</p>" +
@@ -146,7 +150,7 @@ public class UserNotificationService : IUserNotificationService
{
await SendSmsAsync(
phoneNumber: user.Mobile,
message: $"تبریک! عضویت شما در باشگاه مشتریان FourSat فعال شد.",
message: $"تبریک! عضویت شما در باشگاه مشتریان FourSat{packageInfo} فعال شد.",
cancellationToken: cancellationToken);
}
}
@@ -159,6 +163,7 @@ public class UserNotificationService : IUserNotificationService
public async Task SendPayoutErrorNotificationAsync(
long userId,
string errorMessage,
string? packageName = null,
CancellationToken cancellationToken = default)
{
_logger.LogWarning(