|
@@ -8,7 +8,9 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
@@ -284,8 +286,11 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
|
|
|
if(isList) {
|
|
|
// 取出对应的对象集合
|
|
|
Map<String, V> currVOMap = MapUtil.filter(subVOMap, subIdList.toArray(new String[0]));
|
|
|
- List<V> voList = CollUtil.newArrayList(currVOMap.values());
|
|
|
- ReflectUtil.setFieldValue(mainVO, casField, voList);
|
|
|
+ // 2021年11月11日17:30:04,by lijie.解决级联查询已经排好序的列表错乱问题
|
|
|
+ List<V> currList = vos.stream().filter(vo -> currVOMap.containsKey(BeanUtil.getFieldValue(vo, BaseEntity.PROP_ID)))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ // List<V> voList = CollUtil.newArrayList(currVOMap.values());
|
|
|
+ ReflectUtil.setFieldValue(mainVO, casField, currList);
|
|
|
} else {
|
|
|
// 非集合取第一个即可
|
|
|
String subId = subIdList.get(0);
|