修复数据突然查询不到的bug
This commit is contained in:
parent
47f497e25d
commit
a8cc617703
|
@ -1,10 +1,8 @@
|
|||
package com.chint.infrastructure.cache;
|
||||
|
||||
import com.chint.application.commands.OrderApprovalStartCommand;
|
||||
import com.chint.domain.aggregates.order.ApproveOrderNo;
|
||||
import com.chint.domain.aggregates.order.RouteOrder;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.infrastructure.echo_framework.annotation.ListenTo;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcRouteRepository;
|
||||
import com.chint.infrastructure.util.BaseContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -42,7 +40,11 @@ public class RouteCacheService {
|
|||
List<Long> routeIdsByEmployeeNo = routeCacheManage.getRouteIdsByEmployeeNo(employeeNo, null, null);
|
||||
if (routeIdsByEmployeeNo != null) {
|
||||
List<RouteOrder> routeListByIds = routeCacheManage
|
||||
.getRouteListByIds(routeIdsByEmployeeNo).stream().filter(Objects::nonNull).toList();
|
||||
.getRouteListByIds(routeIdsByEmployeeNo)
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(it -> it.getApproveOrderNo() != null && it.getApproveOrderNo().getActualOrderNo() != null)
|
||||
.toList();
|
||||
//如果这里数量对不上名单,那么对该用户的信息重新进行缓存
|
||||
if (routeListByIds.size() != routeIdsByEmployeeNo.size()) {
|
||||
return preloadUserRoutes(employeeNo);
|
||||
|
|
Loading…
Reference in New Issue