fix:修改获取用户行程规划单方法
This commit is contained in:
parent
e4defad983
commit
70361bc150
|
@ -554,7 +554,6 @@ public class OrderQuery {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (legDomainService.checkLocation(legItems)) {
|
||||
routeRepository.reloadRouteOrderInCache(routeOrder);
|
||||
}
|
||||
|
|
|
@ -65,20 +65,21 @@ public class RouteCacheService {
|
|||
public List<RouteOrder> getUserRoutes(String employeeNo) {
|
||||
//获取当前用户所有的订单id
|
||||
List<Long> routeIdsByEmployeeNo = routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, null, null);
|
||||
if (routeIdsByEmployeeNo != null) {
|
||||
List<RouteOrder> 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<RouteOrder> 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<RouteOrder> routeOrders = jdbcRouteRepository.findByUserIdOrApproveOrderNo_Creator(employeeNo, employeeNo);
|
||||
routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, routeOrders, null);
|
||||
|
|
Loading…
Reference in New Issue