Commit 9e8f293a authored by 廖旭伟's avatar 廖旭伟

页面访问路径分析接口修改,避免前端渲染出现环的问题

parent e30d35ec
......@@ -75,7 +75,15 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao,
}
Map<String,Object> result = new HashMap<>();
List<PageWayCensusVo> pageWayCensusVos = dao.getPageWayCensus(pdu);
result.put("links",pageWayCensusVos);
List<PageWayCensusVo> list = new ArrayList<>();
Map<String,String> source = new HashMap<>();
for(PageWayCensusVo item:pageWayCensusVos){
source.put(item.getSource(),item.getSourceName());
if(!source.containsKey(item.getTarget())){
list.add(item);
}
}
result.put("links",list);
List<Map<String, Object>> pageCodes = dao.getPageWayCode(pdu);
result.put("data",pageCodes);
return result;
......
......@@ -77,11 +77,9 @@ public class BuryPointController extends BaseJsonBodyController {
if(CollectionUtils.isNotEmpty(pdu.getDepthArr())){
List<PageRouteEntity> list = new ArrayList<>();
Map<String,String> source = new HashMap<>();
Map<String,String> target = new HashMap<>();
for(PageRouteEntity item:pdu.getDepthArr()){
source.put(item.getSourceCode(),item.getSourceName());
target.put(item.getTargetCode(),item.getTargetName());
if(!source.containsKey(item.getTargetCode()) && !target.containsKey(item.getSourceCode())){
if(!source.containsKey(item.getTargetCode())){
list.add(item);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment