From 75152cea8a298717b8be4bfba594ade8d4a37ad9 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Tue, 9 Jul 2024 15:35:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E5=87=BA=E7=8E=B0=E7=9A=84=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/chint/infrastructure/cache/RouteCacheService.java | 5 +++-- src/test/java/com/chint/CTripTest.java | 2 +- src/test/java/com/chint/LYTest.java | 2 +- src/test/java/com/chint/RouteApplicationTests.java | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java b/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java index 67f8270a..f0ff119a 100644 --- a/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java +++ b/src/main/java/com/chint/infrastructure/cache/RouteCacheService.java @@ -103,7 +103,8 @@ public class RouteCacheService { deleteRouteIdCacheForUser(currentUser.getEmployeeNo(), routeId); return null; } - return routeCacheManage.cacheRouteOrder(routeOrder.reloadStatus()); + updateRouteCache(routeOrder); + return routeOrder; } return routeOrder; } @@ -189,7 +190,7 @@ public class RouteCacheService { List routeIds = routeCacheManage.getRouteIdsByEmployeeNo(userId, null, null); if (routeIds == null || routeIds.size() <= 2) { List routeOrders = preloadUserRoutes(userId); - routeIds = routeOrders.stream().map(RouteOrder::getRouteId).toList(); + routeIds = routeOrders.stream().filter(Objects::nonNull).map(RouteOrder::getRouteId).toList(); } if (!routeIds.contains(routeId)) { List newRouteIds = new ArrayList<>(routeIds); diff --git a/src/test/java/com/chint/CTripTest.java b/src/test/java/com/chint/CTripTest.java index d7e7d364..d5cb84dd 100644 --- a/src/test/java/com/chint/CTripTest.java +++ b/src/test/java/com/chint/CTripTest.java @@ -250,7 +250,7 @@ public class CTripTest { @Test void search() { BaseContext.setCurrentUser(user); - SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("33513622716"); + SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("32158848688"); System.out.println(response); } diff --git a/src/test/java/com/chint/LYTest.java b/src/test/java/com/chint/LYTest.java index 7d30f2c1..6f72618d 100644 --- a/src/test/java/com/chint/LYTest.java +++ b/src/test/java/com/chint/LYTest.java @@ -812,7 +812,7 @@ public class LYTest { @Test void searchFlight() { - FlightOrderResponse flightOrderDetail = lySearchRequest.getFlightOrderDetail("DF24041870728743261"); + FlightOrderResponse flightOrderDetail = lySearchRequest.getFlightOrderDetail("DF24061877666447239"); Gson gson = new Gson(); String json = gson.toJson(flightOrderDetail); System.out.println(json); diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index 1492d61a..76eb4942 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -313,7 +313,7 @@ class RouteApplicationTests { @Test void loginSign() { - String sfno = "230615020"; + String sfno = "211213002"; String syscode = "FSSC"; String billcode = "CLSQ240225000099"; String companycode = "正泰集团股份有限公司";