using Microsoft.AspNetCore.Mvc; using System; using Znyc.Recruitment.Admin.AspNetCore.Controllers; using Znyc.Recruitment.Admin.Security.Dtos; using Znyc.Recruitment.Admin.Security.Entitys; using Znyc.Recruitment.Admin.Security.IServices; namespace Znyc.Recruitment.Admin.WebApi.Controllers { /// /// 日志接口 /// [ApiController] [Route("api/Security/[controller]")] public class ExceptionsLogsController : AreaApiController { private readonly IOrganizeService organizeService; /// /// /// /// public ExceptionsLogsController(IExceptionsLogsService service, IOrganizeService _organizeService) : base(service) { _service = service; organizeService = _organizeService; } /// /// 新增前处理数据 /// /// protected override void OnBeforeInsert(ExceptionsLogsEntity info) { info.Id = 0; info.CreatedTime = DateTime.Now; info.CreatedUserId = CurrentUser.UserId; info.IsDeleted = false; } /// /// 在更新数据前对数据的修改操作 /// /// /// protected override void OnBeforeUpdate(ExceptionsLogsEntity info) { info.ModifiedUserId = CurrentUser.UserId; info.ModifiedTime = DateTime.Now; } /// /// 在软删除数据前对数据的修改操作 /// /// /// protected override void OnBeforeSoftDelete(ExceptionsLogsEntity info) { info.IsDeleted = true; } ///// ///// 异步分页查询 ///// ///// ///// //[HttpPost("FindWithPagerSearchAsync")] //[FunctionAuthorize("List")] //public async Task FindWithPagerSearchAsync(SearchExceptionsLogsModel search) //{ // CommonResult> result = new CommonResult> // { // ResData = await _service.FindWithPagerSearchAsync(search), // ErrCode = ErrCode.successCode // }; // return ToJsonContent(result); //} } }