首页查询资源详情接口
parent
7f33a805cf
commit
3ce3aec59d
|
@ -430,7 +430,7 @@ public class ModuleServiceImpl implements ModuleService {
|
|||
List<String> nameList = Arrays.asList("网络设备", "物理服务器", "安全设备");
|
||||
//查询根节点
|
||||
List<ModuleGroup> rootGroups = moduleGroupRepository.queryRootInName(nameList);
|
||||
log.info("moduleGroups:{}", JSON.toJSONString("moduleGroups"));
|
||||
log.info("moduleGroups:{}", JSON.toJSONString(rootGroups));
|
||||
|
||||
//查询出所有根节点下的子节点
|
||||
|
||||
|
@ -452,11 +452,16 @@ public class ModuleServiceImpl implements ModuleService {
|
|||
param.setSign(Sign.EQ);
|
||||
paramList.add(param);
|
||||
pager.setParams(paramList);
|
||||
GeneralResult<JSONObject> list = cmpInternalService.list(pager.toMap());
|
||||
log.info("list:{}", JSON.toJSONString(list));
|
||||
GeneralResult<JSONObject> result = cmpInternalService.list(pager.toMap());
|
||||
if(result.isFailed()){
|
||||
log.info("list:{}", JSON.toJSONString(result));
|
||||
return new GeneralResult(false,"查询失败");
|
||||
}
|
||||
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
resultMap.put("vm",result.getData().getInteger("total"));
|
||||
|
||||
return new GeneralResult<>(true, "查询成功");
|
||||
return new GeneralResult<>(true, resultMap,"查询成功");
|
||||
} catch (Exception e) {
|
||||
log.info("查询失败", e);
|
||||
return new GeneralResult<>(false, "查询失败");
|
||||
|
|
Loading…
Reference in New Issue