private SubSystemDTO ToSubSystemDTO(SubSystems item) { SubSystemDTO result = new SubSystemDTO(); result.ID = item.ID; result.Name = item.Name; result.Description = item.Description; return(result); }
public async Task <ResultModel <SubSystemDTO> > GetSubSystemInfo([Required(ErrorMessage = "唯一标识不可以为空")] Guid id) { try { SubSystemDTO result = await _subSystemService.GetSubSystemInfoAsync(id); return(ResultModel <SubSystemDTO> .Success(result, "查询成功")); } catch (AspectInvocationException ex) { return(ResultModel <SubSystemDTO> .Fail(ex.InnerException?.Message)); } catch (InvalidOperationException ex) { return(ResultModel <SubSystemDTO> .Fail(ex.Message)); } }