/// <summary> /// 检测nodeIndex是否存在 /// </summary> /// <param name="publishmentSystemId"></param> /// <param name="nodeIndexName"></param> /// <returns></returns> public virtual async Task <IdentityResult> CheckDuplicateNodeIndex(long?expectedNodeId, long publishmentSystemId, string nodeIndexName) { var node = (await _nodeRepository.FindByIndexAsync(publishmentSystemId, nodeIndexName)); if (node != null && node.Id != expectedNodeId) { return(AbpIdentityResult.Failed(string.Format(L("Identity.DuplicateIndexName"), nodeIndexName))); } return(IdentityResult.Success); }
/// <summary> /// 根据publishmentSystemId, nodeIndex获取栏目集合 /// </summary> /// <param name="?"></param> /// <returns></returns> public async Task <GetNodesOutput> GetNodeByNodeIndex(GetNodesInput input) { GetNodesOutput output = new GetNodesOutput(); //根据publishmentSystemId, nodeIndex查询 if (!string.IsNullOrEmpty(input.NodeIndex)) { var node = Mapper.DynamicMap <NodeDto>(await _nodeRepository.FindByIndexAsync(input.PublishmentSystemId, input.NodeIndex)); output.Items.Add(node); output.Node = node; } return(output); }