end verification
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Common\DTOs\" />
|
||||
<Folder Include="Features\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -33,7 +34,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Service">
|
||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -36,6 +36,16 @@ namespace Back.Controllers
|
||||
val= _getVerificationValidation.verificationCode.val
|
||||
});;
|
||||
}
|
||||
[HttpGet("ReSend/{ID}")]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult> ReSend(int ID)
|
||||
{
|
||||
var resultValidationmodel = await _getVerificationValidation.ValidateAsync(ID);
|
||||
if (!resultValidationmodel.IsValid)
|
||||
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());
|
||||
// _getVerificationValidation.verificationCode
|
||||
return NoContent();
|
||||
}
|
||||
[HttpPost("Submit")]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<bool>> Submit(VerificationCodeDto item)
|
||||
@@ -48,13 +58,19 @@ namespace Back.Controllers
|
||||
{
|
||||
if (VerificationCode.prm == item.prm && VerificationCode.val == item.val && VerificationCode.Type == item.Type)
|
||||
{
|
||||
bool Sucstatus = false;
|
||||
switch (VerificationCode.Type)
|
||||
{
|
||||
case "NewTicketNoAuthentication":
|
||||
return Ok(_servValidatinMsg.SubmittedTicket(VerificationCode));
|
||||
Sucstatus = await _servValidatinMsg.SubmittedTicket(VerificationCode);
|
||||
break;
|
||||
default:
|
||||
return BadRequest("این نوع احراز تعریف نشده");
|
||||
}
|
||||
if (Sucstatus)
|
||||
await _servValidatinMsg.Delete(VerificationCode);
|
||||
|
||||
return Ok(Sucstatus);
|
||||
}
|
||||
else return BadRequest("اطلاعات شما منطبق با سامانه نیست");
|
||||
|
||||
@@ -62,5 +78,13 @@ namespace Back.Controllers
|
||||
else return BadRequest("کد احراز صحیح نمی باشد");
|
||||
|
||||
}
|
||||
[HttpDelete("Remove/{ID}")]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<bool>> Remove(int ID)
|
||||
{
|
||||
var VerificationCode = await _servValidatinMsg.GetVerificationCode(ID);
|
||||
await _servValidatinMsg.Delete(VerificationCode);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,14 @@ namespace Back.Services
|
||||
{
|
||||
return await _verificationCodeRepo.Get(w => w.ID == ID).FirstOrDefaultAsync();
|
||||
}
|
||||
public async Task<bool> Delete(VerificationCode model)
|
||||
{
|
||||
return await _verificationCodeRepo.DeleteAsync(model);
|
||||
}
|
||||
public async Task<bool> SubmittedTicket(VerificationCode code)
|
||||
{
|
||||
var ticket = await _ticket.Get(w => w.ID == Convert.ToInt32(code.prm)).FirstOrDefaultAsync();
|
||||
if (ticket != null)
|
||||
if (ticket != null && ticket.Status== StatusTicket.unknownPerson)
|
||||
{
|
||||
ticket.Status = StatusTicket.Awaitingreview;
|
||||
return await _ticket.UpdateAsync(ticket);
|
||||
|
||||
@@ -24,7 +24,10 @@ namespace Back.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
var item=await _ticketUnknownPeopleRepo.AddAsync(new TiceketUnknownPeople
|
||||
var ID= _ticketUnknownPeopleRepo.Get(w=>w.Mobile==Mobile).Select(s=>s.ID).FirstOrDefault();
|
||||
if (ID!=null && ID > 0)
|
||||
return ID;
|
||||
var item=await _ticketUnknownPeopleRepo.AddAsync(new TiceketUnknownPeople
|
||||
{
|
||||
FullName = FullName,
|
||||
Mobile = Mobile
|
||||
|
||||
Reference in New Issue
Block a user