Commit c4979560 authored by 赵啸非's avatar 赵啸非

动态字段调整排序逻辑

parent 8acffc03
...@@ -96,8 +96,17 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD ...@@ -96,8 +96,17 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
return null; return null;
} }
}).filter(f -> f != null).collect(Collectors.toList()); }).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(dataSets)) { if (!ObjectUtils.isEmpty(dataSets)) {
query.setIdList(dataSets); //排序-
List<Long> orderList = new ArrayList<>();
for (Long dataId : datasetIdList) {
if(dataSets.contains(dataId)){
orderList.add(dataId);
}
}
query.setIdList(orderList);
} else { } else {
query.setIdList(ListUtil.toList(0L)); query.setIdList(ListUtil.toList(0L));
} }
...@@ -119,7 +128,6 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD ...@@ -119,7 +128,6 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
if (!ObjectUtils.isEmpty(datasetIdList)) { if (!ObjectUtils.isEmpty(datasetIdList)) {
query.setIdList(datasetIdList); query.setIdList(datasetIdList);
//query.setOrderColList(); //query.setOrderColList();
} else { } else {
query.setIdList(ListUtil.toList(0L)); query.setIdList(ListUtil.toList(0L));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment