mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 14:32:18 +00:00
add support for Join Annotation
This commit is contained in:
parent
7205344a26
commit
b0ef7bbf10
@ -10,11 +10,14 @@ public class FunctionDesp implements Serializable {
|
||||
public String functionName;
|
||||
public RouteInfo routeInfo;
|
||||
public boolean isView;
|
||||
public JoinInfo joinInfo;
|
||||
|
||||
public FunctionDesp(String name, List<AnnotationNode> annos, RouteInfo routeInfo, boolean isView) {
|
||||
|
||||
public FunctionDesp(String name, List<AnnotationNode> annos, RouteInfo routeInfo, JoinInfo joinInfo, boolean isView) {
|
||||
this.functionName = name;
|
||||
this.annotations = annos;
|
||||
this.routeInfo = routeInfo;
|
||||
this.joinInfo = joinInfo;
|
||||
this.isView = isView;
|
||||
}
|
||||
|
||||
|
@ -13,14 +13,8 @@ public class JoinInfo implements Serializable {
|
||||
JoinInfo info = new JoinInfo();
|
||||
info.joinRule = null;
|
||||
if (annotationNode.getArgs().size() == 1) {
|
||||
switch (annotationNode.getArgs().get(0)) {
|
||||
case "add":
|
||||
info.joinRule = DefaultJoinRule.add;
|
||||
break;
|
||||
case "multiply":
|
||||
info.joinRule = DefaultJoinRule.multiply;
|
||||
break;
|
||||
}
|
||||
String str = annotationNode.getArgs().get(0);
|
||||
info = JsonUtil.fromJson(str, JoinInfo.class);
|
||||
}
|
||||
System.out.println("[JoinInfo] annotationNode:" + JsonUtil.toJson(annotationNode));
|
||||
return info;
|
||||
|
Loading…
x
Reference in New Issue
Block a user