public async Task <ResultModel <NamespaceDTO> > GetNamespaceInfo(Guid id) { try { NamespaceDTO result = await namespaceService.GetNamespaceInfoAsync(id); return(ResultModel <NamespaceDTO> .Success(result, "查询成功")); } catch (AspectInvocationException ex) { return(ResultModel <NamespaceDTO> .Fail(ex.InnerException?.Message)); } catch (MateralConfigCenterException ex) { return(ResultModel <NamespaceDTO> .Fail(ex.Message)); } }
public async Task <ResultModel <NamespaceDTO> > GetNamespaceInfoAsync([Required(ErrorMessage = "唯一标识不能为空")] Guid id) { NamespaceDTO result = await _namespaceService.GetNamespaceInfoAsync(id); return(ResultModel <NamespaceDTO> .Success(result, "查询成功")); }