订单数据源数据速度优化

This commit is contained in:
luojiaquan
2026-10-20 10:14:38 +08:00
parent 58d7ec90b0
commit 8093cb52e7
2 changed files with 25 additions and 5 deletions
@@ -728,10 +728,26 @@ public class TabOrderMonitorService
return s == null ? "" : s;
}
/** 已排序主键的内存分页切片,并按切片顺序回查明细(VO)。 */
/** 已排序主键的内存分页切片,并按切片顺序回查明细(VO)。
* 列表页只需展示列:走窄列 ListByIds,避免公网传输 o.* 全行宽表(同步专用)拖慢列表。 */
private List<TabOrderMonitorVo> doPageByKeys(String table, List<MatchedOrderKey> orderedKeys, int pn, int ps)
{
return toVoList(doRowsByKeys(table, orderedKeys, pn, ps));
if (orderedKeys == null || orderedKeys.isEmpty())
{
return Collections.emptyList();
}
int from = (pn - 1) * ps;
if (from >= orderedKeys.size())
{
return Collections.emptyList();
}
List<MatchedOrderKey> slice = orderedKeys.subList(from, Math.min(from + ps, orderedKeys.size()));
List<String> ids = new ArrayList<String>(slice.size());
for (MatchedOrderKey key : slice)
{
ids.add(key.getId());
}
return loadListVosByIds(table, ids);
}
/** 已排序主键的内存分页切片,按切片顺序回查全行(VO + Oracle 原始行)。 */