...
|
...
|
@@ -22,6 +22,8 @@ import java.util.List; |
|
|
public class TypeInfoCtrl {
|
|
|
public static final Logger DEBUG = LoggerFactory.getLogger(TypeInfoCtrl.class);
|
|
|
|
|
|
public static final String TYPE_JAVA_APP="java_app";
|
|
|
|
|
|
@Autowired
|
|
|
ITypeInfoService typeInfoService;
|
|
|
|
...
|
...
|
@@ -72,10 +74,8 @@ public class TypeInfoCtrl { |
|
|
|
|
|
if (null != allTypeInfo) {
|
|
|
|
|
|
for (TypeInfo info : allTypeInfo)
|
|
|
{
|
|
|
if(1==info.getTypeIsLeaf())
|
|
|
{
|
|
|
for (TypeInfo info : allTypeInfo) {
|
|
|
if (1 == info.getTypeIsLeaf()) {
|
|
|
leafTypeInfo.add(info);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -249,6 +249,34 @@ public class TypeInfoCtrl { |
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/queryJavaApi", method = RequestMethod.GET)
|
|
|
public BaseResponse queryJavaApi() {
|
|
|
|
|
|
DEBUG.debug("Query all java api info...");
|
|
|
|
|
|
List<TypeInfo> allTypeInfo = null;
|
|
|
|
|
|
BaseResponse response = new BaseResponse();
|
|
|
|
|
|
try {
|
|
|
TypeInfo typeInfo = typeInfoService.queryTypeInfoByName(TYPE_JAVA_APP);
|
|
|
|
|
|
if (typeInfo != null) {
|
|
|
allTypeInfo = typeInfoService.queryChildTypesInfo(typeInfo.getTypeId());
|
|
|
if (null != allTypeInfo) {
|
|
|
response.setData(allTypeInfo);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
DEBUG.error("Failed to query all typeInfo, error: {}", e);
|
|
|
response.setCode(400);
|
|
|
response.setMessage(e.getMessage());
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/queryNode", method = RequestMethod.GET)
|
|
|
public BaseResponse queryNodeTypeInfo() {
|
|
|
|
...
|
...
|
@@ -265,10 +293,8 @@ public class TypeInfoCtrl { |
|
|
|
|
|
if (null != allTypeInfo) {
|
|
|
|
|
|
for (TypeInfo info : allTypeInfo)
|
|
|
{
|
|
|
if(0==info.getTypeIsLeaf())
|
|
|
{
|
|
|
for (TypeInfo info : allTypeInfo) {
|
|
|
if (0 == info.getTypeIsLeaf()) {
|
|
|
leafTypeInfo.add(info);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -288,5 +314,4 @@ public class TypeInfoCtrl { |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|