public async Task <AuditLog> FindAsync(int auditLogId) { var auditLog = await _auditLogRepository.FindAsync(auditLogId); if (auditLog == null) { throw new NotFoundException(); } return(auditLog); }
/// <summary> /// 根据ID获取审计日志信息 /// 2021-04-30 create by sean /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <AuditLogDto> GetAsync(Guid id) { var existsAuditLog = await _auditLogRepository.FindAsync(id); if (existsAuditLog == null) { throw new UserFriendlyException(_localizer["AuditLogNotExistsException"]); } return(ObjectMapper.Map <AuditLog, AuditLogDto>(existsAuditLog)); }