|
@@ -144,10 +144,15 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
|
|
|
if(CollUtil.isEmpty(relations)) {
|
|
|
array.add("0");
|
|
|
} else {
|
|
|
- List<String> relList = CollUtil.getFieldValues(relations, "objTo", String.class);
|
|
|
+ List<String> relList = CollUtil.getFieldValues(relations, annotationInfo.selectToObj()?"objTo":"objFrom", String.class);
|
|
|
relList.forEach(id -> array.add(id));
|
|
|
}
|
|
|
- return groupMapList(relations, "objFrom", "objTo");
|
|
|
+ if(annotationInfo.selectToObj()){
|
|
|
+ return groupMapList(relations, "objFrom", "objTo");
|
|
|
+ }else{
|
|
|
+ return groupMapList(relations, "objTo", "objFrom");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|