You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

61 lines
1.9 KiB

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Znyc.CloudCar.IServices.Certification;
using Znyc.CloudCar.Model.Dtos.Certification;
using Znyc.CloudCar.Model.ViewModels.ReportsCallBack;
namespace Znyc.CloudCar.Controller
{
/// <summary>
/// 实名认证管理
/// </summary>
public class CertificationController : ControllerBase
{
private readonly ICertificationService _certificationService;
public CertificationController(
ICertificationService certificationService
)
{
_certificationService = certificationService;
}
/// <summary>
/// 查询实名认证信息
/// </summary>
/// <returns></returns>
[HttpGet]
[Authorize]
[Route("api/v1/certification")]
public async Task<ResponseOutput> GetAsync()
{
return await _certificationService.GetAsync();
}
/// <summary>
/// 新增实名认证信息
/// </summary>
/// <param name="certificationAddInput"></param>
/// <returns></returns>
[HttpPost]
[Authorize]
[Route("api/v1/certification")]
public async Task<ResponseOutput> AddAsync([FromBody] CertificationAddInput certificationAddInput)
{
return await _certificationService.AddAsync(certificationAddInput);
}
/// <summary>
/// 更新实名认证信息
/// </summary>
/// <param name="certificationUpdateInput"></param>
/// <returns></returns>
[HttpPut]
[Authorize]
[Route("api/v1/certification/update")]
public async Task<ResponseOutput> UpdateAsync([FromBody] CertificationUpdateInput certificationUpdateInput)
{
return await _certificationService.UpdateAsync(certificationUpdateInput);
}
}
}