fix:修改获取用户行程规划单方法
This commit is contained in:
parent
e4defad983
commit
70361bc150
|
@ -554,7 +554,6 @@ public class OrderQuery {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (legDomainService.checkLocation(legItems)) {
|
if (legDomainService.checkLocation(legItems)) {
|
||||||
routeRepository.reloadRouteOrderInCache(routeOrder);
|
routeRepository.reloadRouteOrderInCache(routeOrder);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,20 +65,21 @@ public class RouteCacheService {
|
||||||
public List<RouteOrder> getUserRoutes(String employeeNo) {
|
public List<RouteOrder> getUserRoutes(String employeeNo) {
|
||||||
//获取当前用户所有的订单id
|
//获取当前用户所有的订单id
|
||||||
List<Long> routeIdsByEmployeeNo = routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, null, null);
|
List<Long> routeIdsByEmployeeNo = routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, null, null);
|
||||||
if (routeIdsByEmployeeNo != null) {
|
if (routeIdsByEmployeeNo != null && !routeIdsByEmployeeNo.isEmpty()) {
|
||||||
List<RouteOrder> routeListByIds = routeCacheManage
|
return queryByIdIn(routeIdsByEmployeeNo).stream().filter(Objects::nonNull).toList();
|
||||||
.getRouteListByIds(routeIdsByEmployeeNo)
|
// List<RouteOrder> routeListByIds = routeCacheManage
|
||||||
.stream()
|
// .getRouteListByIds(routeIdsByEmployeeNo)
|
||||||
.filter(Objects::nonNull)
|
// .stream()
|
||||||
.toList();
|
// .filter(Objects::nonNull)
|
||||||
//如果这里数量对不上名单,那么对该用户的信息重新进行缓存
|
// .toList();
|
||||||
if (routeListByIds.size() != routeIdsByEmployeeNo.size()) {
|
// //如果这里数量对不上名单,那么对该用户的信息重新进行缓存
|
||||||
return preloadUserRoutes(employeeNo);
|
// if (routeListByIds.size() != routeIdsByEmployeeNo.size()) {
|
||||||
}
|
// return preloadUserRoutes(employeeNo);
|
||||||
if (routeListByIds.size() <= 1) {
|
// }
|
||||||
return preloadUserRoutes(employeeNo);
|
// if (routeListByIds.size() <= 1) {
|
||||||
}
|
// return preloadUserRoutes(employeeNo);
|
||||||
return routeListByIds;
|
// }
|
||||||
|
// return routeListByIds;
|
||||||
} else {
|
} else {
|
||||||
List<RouteOrder> routeOrders = jdbcRouteRepository.findByUserIdOrApproveOrderNo_Creator(employeeNo, employeeNo);
|
List<RouteOrder> routeOrders = jdbcRouteRepository.findByUserIdOrApproveOrderNo_Creator(employeeNo, employeeNo);
|
||||||
routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, routeOrders, null);
|
routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, routeOrders, null);
|
||||||
|
|
Loading…
Reference in New Issue