订单数据源数据速度优化
This commit is contained in:
@@ -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 原始行)。 */
|
||||
|
||||
Reference in New Issue
Block a user