This commit is contained in:
masoodafar-web
2025-11-16 01:53:09 +03:30
parent 101df26097
commit 8f327158d5
5 changed files with 595 additions and 727 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Protobuf.Protos.OtpToken;
namespace FrontOffice.BFF.Application.UserCQ.Commands.CreateContractOtpToken; namespace FrontOffice.BFF.Application.UserCQ.Commands.CreateContractOtpToken;
public class CreateContractOtpTokenCommandHandler : IRequestHandler<CreateContractOtpTokenCommand, Unit> public class CreateContractOtpTokenCommandHandler : IRequestHandler<CreateContractOtpTokenCommand, Unit>
{ {
@@ -10,7 +12,11 @@ public class CreateContractOtpTokenCommandHandler : IRequestHandler<CreateContra
public async Task<Unit> Handle(CreateContractOtpTokenCommand request, CancellationToken cancellationToken) public async Task<Unit> Handle(CreateContractOtpTokenCommand request, CancellationToken cancellationToken)
{ {
//TODO: Implement your business logic var response = await _context.OtpToken.CreateNewOtpTokenAsync(request: new CreateNewOtpTokenRequest()
return new Unit(); {
}, cancellationToken: cancellationToken);
if (response.Success && !string.IsNullOrWhiteSpace(response.Code))
await _kavenegarService.VerifyLookup(mobile: request.Mobile, response.Code);
} }
} }

View File

@@ -1,4 +1,5 @@
using FrontOffice.BFF.Protobuf.Protos.User; using FrontOffice.BFF.Application.UserCQ.Commands.AcceptContract;
using FrontOffice.BFF.Application.UserCQ.Commands.CreateContractOtpToken;
using FrontOffice.BFF.WebApi.Common.Services; using FrontOffice.BFF.WebApi.Common.Services;
using FrontOffice.BFF.Application.UserCQ.Commands.UpdateUser; using FrontOffice.BFF.Application.UserCQ.Commands.UpdateUser;
using FrontOffice.BFF.Application.UserCQ.Commands.DeleteUser; using FrontOffice.BFF.Application.UserCQ.Commands.DeleteUser;

View File

@@ -1,5 +1,5 @@
using FluentValidation; using FluentValidation;
using FrontOfficeMicroservice.Protobuf.Protos.User; using FrontOffice.BFF.User.Protobuf.Protos.User;
namespace FrontOfficeMicroservice.Protobuf.Validator.User; namespace FrontOfficeMicroservice.Protobuf.Validator.User;
public class AcceptContractRequestValidator : AbstractValidator<AcceptContractRequest> public class AcceptContractRequestValidator : AbstractValidator<AcceptContractRequest>

View File

@@ -1,5 +1,5 @@
using FluentValidation; using FluentValidation;
using FrontOfficeMicroservice.Protobuf.Protos.User; using FrontOffice.BFF.User.Protobuf.Protos.User;
namespace FrontOfficeMicroservice.Protobuf.Validator.User; namespace FrontOfficeMicroservice.Protobuf.Validator.User;
public class CreateContractOtpTokenRequestValidator : AbstractValidator<CreateContractOtpTokenRequest> public class CreateContractOtpTokenRequestValidator : AbstractValidator<CreateContractOtpTokenRequest>