mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 22:42:19 +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 String functionName;
|
||||||
public RouteInfo routeInfo;
|
public RouteInfo routeInfo;
|
||||||
public boolean isView;
|
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.functionName = name;
|
||||||
this.annotations = annos;
|
this.annotations = annos;
|
||||||
this.routeInfo = routeInfo;
|
this.routeInfo = routeInfo;
|
||||||
|
this.joinInfo = joinInfo;
|
||||||
this.isView = isView;
|
this.isView = isView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,14 +13,8 @@ public class JoinInfo implements Serializable {
|
|||||||
JoinInfo info = new JoinInfo();
|
JoinInfo info = new JoinInfo();
|
||||||
info.joinRule = null;
|
info.joinRule = null;
|
||||||
if (annotationNode.getArgs().size() == 1) {
|
if (annotationNode.getArgs().size() == 1) {
|
||||||
switch (annotationNode.getArgs().get(0)) {
|
String str = annotationNode.getArgs().get(0);
|
||||||
case "add":
|
info = JsonUtil.fromJson(str, JoinInfo.class);
|
||||||
info.joinRule = DefaultJoinRule.add;
|
|
||||||
break;
|
|
||||||
case "multiply":
|
|
||||||
info.joinRule = DefaultJoinRule.multiply;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
System.out.println("[JoinInfo] annotationNode:" + JsonUtil.toJson(annotationNode));
|
System.out.println("[JoinInfo] annotationNode:" + JsonUtil.toJson(annotationNode));
|
||||||
return info;
|
return info;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user