feat: refine user filtering logic in Chatika account activation and Daya loan check jobs

This commit is contained in:
masoodafar-web
2025-12-24 01:36:43 +03:30
parent 41308e189a
commit 13f24d523b
2 changed files with 8 additions and 4 deletions
@@ -39,12 +39,17 @@ public class DayaLoanCheckWorker
try
{
// پیدا کردن کاربرانی که اعتبار دایا را دریافت نکرده‌اند
// پیدا کردن کاربرانی که:
// 1. اعتبار دایا را دریافت نکرده‌اند
// 2. کد ملی دارند
// 3. قبلاً شماره قرارداد نگرفته‌اند
var pendingUsers = await _context.Users
.Where(u =>
u.HasReceivedDayaCredit == false &&
u.NationalCode != null &&
u.NationalCode != "")
u.NationalCode != ""
)
.Select(u => new { u.Id, u.NationalCode })
.ToListAsync();