using System.Collections.Generic; using System.Threading.Tasks; using GxPress.Auth; using GxPress.Request.App.AdminVerify; using GxPress.Result.App.AdminVerify; using GxPress.Service.Interface.AdminVerify; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace GxPress.Api.AppControllers { /// /// 验证信息 /// [Route("api/app/admin-verify")] [ApiController] [Authorize] public class AdminVerifyController : ControllerBase { private readonly IAdminVerifyService _adminVerifyService; private readonly ILoginContext _loginContext; public AdminVerifyController(IAdminVerifyService adminVerifyService,ILoginContext loginContext) { _adminVerifyService = adminVerifyService; _loginContext = loginContext; } /// /// 清空 /// /// [HttpDelete("delete")] public async Task DeleteAllAsync() { return await _adminVerifyService.DeleteAllAsync(_loginContext.AccountId); } /// /// 修改 /// /// /// [HttpPut("update")] public async Task UpdateAsync(AdminVerifyUpdateRequest request) { return await _adminVerifyService.UpdateAsync(request.Id, request.AdminVerifyTypeConst); } /// /// 根据用户查询 /// /// [HttpPost("search")] public async Task> GetAllAsync() { return await _adminVerifyService.GetAllAsync(_loginContext.AccountId); } /// /// 查询未处理条数 /// /// [HttpPost("count")] public async Task GetUDisposeCount() { return await _adminVerifyService.GetUDisposeCount(_loginContext.AccountId); } } }