diff --git a/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQuery.cs b/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQuery.cs index c379453..1bbb559 100644 --- a/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQuery.cs +++ b/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQuery.cs @@ -10,6 +10,8 @@ public record GetAllUserByFilterQuery : IRequest }public class GetAllUserByFilterFilter { + //جستجوی متنی (نام، نام خانوادگی، موبایل، کدملی) + public string? SearchText { get; set; } //شناسه public long? Id { get; set; } //نام diff --git a/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQueryHandler.cs b/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQueryHandler.cs index 9e56ac9..d2cc23e 100644 --- a/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQueryHandler.cs +++ b/src/CMSMicroservice.Application/UserCQ/Queries/GetAllUserByFilter/GetAllUserByFilterQueryHandler.cs @@ -17,6 +17,11 @@ public class GetAllUserByFilterQueryHandler : IRequestHandler request.Filter.SearchText == null || + x.FirstName.Contains(request.Filter.SearchText) || + x.LastName.Contains(request.Filter.SearchText) || + x.Mobile.Contains(request.Filter.SearchText) || + x.NationalCode.Contains(request.Filter.SearchText)) .Where(x => request.Filter.Id == null || x.Id == request.Filter.Id) .Where(x => request.Filter.FirstName == null || x.FirstName.Contains(request.Filter.FirstName)) .Where(x => request.Filter.LastName == null || x.LastName.Contains(request.Filter.LastName)) diff --git a/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj b/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj index d4fb9b0..2c8ca54 100644 --- a/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj +++ b/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj @@ -3,7 +3,7 @@ net9.0 enable enable - 0.0.146 + 0.0.147 None False False diff --git a/src/CMSMicroservice.Protobuf/Protos/user.proto b/src/CMSMicroservice.Protobuf/Protos/user.proto index 58c288f..93878d3 100644 --- a/src/CMSMicroservice.Protobuf/Protos/user.proto +++ b/src/CMSMicroservice.Protobuf/Protos/user.proto @@ -129,20 +129,21 @@ message GetAllUserByFilterRequest } message GetAllUserByFilterFilter { - google.protobuf.Int64Value id = 1; - google.protobuf.StringValue first_name = 2; - google.protobuf.StringValue last_name = 3; - google.protobuf.StringValue mobile = 4; - google.protobuf.StringValue national_code = 5; - google.protobuf.StringValue avatar_path = 6; - google.protobuf.Int64Value parent_id = 7; - google.protobuf.StringValue referral_code = 8; - google.protobuf.BoolValue is_mobile_verified = 9; - google.protobuf.Timestamp mobile_verified_at = 10; - google.protobuf.BoolValue email_notifications = 11; - google.protobuf.BoolValue sms_notifications = 12; - google.protobuf.BoolValue push_notifications = 13; - google.protobuf.Timestamp birth_date = 14; + google.protobuf.StringValue search_text = 1; + google.protobuf.Int64Value id = 2; + google.protobuf.StringValue first_name = 3; + google.protobuf.StringValue last_name = 4; + google.protobuf.StringValue mobile = 5; + google.protobuf.StringValue national_code = 6; + google.protobuf.StringValue avatar_path = 7; + google.protobuf.Int64Value parent_id = 8; + google.protobuf.StringValue referral_code = 9; + google.protobuf.BoolValue is_mobile_verified = 10; + google.protobuf.Timestamp mobile_verified_at = 11; + google.protobuf.BoolValue email_notifications = 12; + google.protobuf.BoolValue sms_notifications = 13; + google.protobuf.BoolValue push_notifications = 14; + google.protobuf.Timestamp birth_date = 15; } message GetAllUserByFilterResponse { diff --git a/src/CMSMicroservice.WebApi/Workers/DayaLoanCheckWorker.cs b/src/CMSMicroservice.WebApi/Workers/DayaLoanCheckWorker.cs index db27d66..02df92d 100644 --- a/src/CMSMicroservice.WebApi/Workers/DayaLoanCheckWorker.cs +++ b/src/CMSMicroservice.WebApi/Workers/DayaLoanCheckWorker.cs @@ -114,7 +114,7 @@ public class DayaLoanCheckWorker recurringJobManager.AddOrUpdate( "daya-loan-check", worker => worker.ExecuteAsync(), - "*/01 * * * *", // هر 15 دقیقه + "*/20 * * * *", // هر 15 دقیقه TimeZoneInfo.Local ); }