EPS 增加数据结构名称信息
This commit is contained in:
@@ -44,6 +44,8 @@ public class CoolEps {
|
|||||||
private int serverPort;
|
private int serverPort;
|
||||||
|
|
||||||
private Dict entityInfo;
|
private Dict entityInfo;
|
||||||
|
|
||||||
|
private Dict menuInfo;
|
||||||
|
|
||||||
private JSONObject swaggerInfo;
|
private JSONObject swaggerInfo;
|
||||||
|
|
||||||
@@ -63,6 +65,7 @@ public class CoolEps {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entityInfo = Dict.create();
|
entityInfo = Dict.create();
|
||||||
|
menuInfo = Dict.create();
|
||||||
swaggerInfo = swaggerInfo();
|
swaggerInfo = swaggerInfo();
|
||||||
Runnable task = () -> {
|
Runnable task = () -> {
|
||||||
entity();
|
entity();
|
||||||
@@ -132,6 +135,7 @@ public class CoolEps {
|
|||||||
item.set("api", new ArrayList<Dict>());
|
item.set("api", new ArrayList<Dict>());
|
||||||
item.set("prefix", prefix);
|
item.set("prefix", prefix);
|
||||||
item.set("columns", entityInfo.get(entityName));
|
item.set("columns", entityInfo.get(entityName));
|
||||||
|
item.set("menu", menuInfo.get( entityName ) );
|
||||||
item.set("api", apis(prefix, methodPath, item.getBean("api")));
|
item.set("api", apis(prefix, methodPath, item.getBean("api")));
|
||||||
urls.add(item);
|
urls.add(item);
|
||||||
}
|
}
|
||||||
@@ -286,6 +290,13 @@ public class CoolEps {
|
|||||||
Field[] fields = getAllDeclaredFields(e);
|
Field[] fields = getAllDeclaredFields(e);
|
||||||
List<Dict> columns = columns(fields);
|
List<Dict> columns = columns(fields);
|
||||||
entityInfo.set(e.getSimpleName(), columns);
|
entityInfo.set(e.getSimpleName(), columns);
|
||||||
|
|
||||||
|
|
||||||
|
Table mergedAnnotation = AnnotatedElementUtils.findMergedAnnotation(e, Table.class);
|
||||||
|
|
||||||
|
menuInfo.set(e.getSimpleName(), mergedAnnotation.comment());
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user