fix:优化行程规划分页查询的逻辑
This commit is contained in:
parent
11394fc723
commit
391ec93f27
|
@ -36,6 +36,11 @@ public class RouteCacheService {
|
|||
|
||||
|
||||
public List<RouteOrder> preloadUserRoutes(String employeeNo) {
|
||||
List<Long> routeIdsByEmployeeNo = routeCacheManage
|
||||
.getRouteIdsByEmployeeNo(employeeNo, null, null).stream().filter(Objects::nonNull).toList();
|
||||
if (!routeIdsByEmployeeNo.isEmpty()) {
|
||||
return routeCacheManage.getRouteListByIds(routeIdsByEmployeeNo);
|
||||
}
|
||||
log.info("开始缓存用户行程规划单");
|
||||
List<RouteOrder> routeOrders = jdbcRouteRepository.findByUserIdOrApproveOrderNo_Creator(employeeNo, employeeNo);
|
||||
for (RouteOrder routeOrder : routeOrders) {
|
||||
|
|
|
@ -114,7 +114,7 @@ public abstract class AbstractGenericRepository<T, ID> {
|
|||
}
|
||||
|
||||
// Step 4: Return the complete list
|
||||
return inCacheList;
|
||||
return inCacheList.stream().filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<T> findByFieldsIn(String fieldPrefix,
|
||||
|
|
Loading…
Reference in New Issue