diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index d1822949..8b34c68b 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -554,7 +554,6 @@ public class OrderQuery { } } - if (legDomainService.checkLocation(legItems)) { routeRepository.reloadRouteOrderInCache(routeOrder); } diff --git a/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java b/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java index 8b4a4068..10016e16 100644 --- a/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java +++ b/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java @@ -65,20 +65,21 @@ public class RouteCacheService { public List getUserRoutes(String employeeNo) { //获取当前用户所有的订单id List routeIdsByEmployeeNo = routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, null, null); - if (routeIdsByEmployeeNo != null) { - List routeListByIds = routeCacheManage - .getRouteListByIds(routeIdsByEmployeeNo) - .stream() - .filter(Objects::nonNull) - .toList(); - //如果这里数量对不上名单,那么对该用户的信息重新进行缓存 - if (routeListByIds.size() != routeIdsByEmployeeNo.size()) { - return preloadUserRoutes(employeeNo); - } - if (routeListByIds.size() <= 1) { - return preloadUserRoutes(employeeNo); - } - return routeListByIds; + if (routeIdsByEmployeeNo != null && !routeIdsByEmployeeNo.isEmpty()) { + return queryByIdIn(routeIdsByEmployeeNo).stream().filter(Objects::nonNull).toList(); +// List routeListByIds = routeCacheManage +// .getRouteListByIds(routeIdsByEmployeeNo) +// .stream() +// .filter(Objects::nonNull) +// .toList(); +// //如果这里数量对不上名单,那么对该用户的信息重新进行缓存 +// if (routeListByIds.size() != routeIdsByEmployeeNo.size()) { +// return preloadUserRoutes(employeeNo); +// } +// if (routeListByIds.size() <= 1) { +// return preloadUserRoutes(employeeNo); +// } +// return routeListByIds; } else { List routeOrders = jdbcRouteRepository.findByUserIdOrApproveOrderNo_Creator(employeeNo, employeeNo); routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, routeOrders, null);