From 11394fc7232f32a17e9f473e4d3c067aa9845187 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Mon, 8 Jul 2024 16:17:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E8=A1=8C=E7=A8=8B?= =?UTF-8?q?=E8=A7=84=E5=88=92=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/chint/application/queryies/OrderQuery.java | 3 ++- .../repository/AbstractGenericRepository.java | 2 +- .../interfaces/rest/data_center/user/BatchUserWorker.java | 2 -- src/test/java/com/chint/RouteApplicationTests.java | 6 +++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index 2908aec5..f6a2943f 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -163,7 +163,8 @@ public class OrderQuery { Set employeeNoSet = routeOrders.stream().filter(it -> it.getApproveOrderNo() != null) .flatMap(it -> Stream.of(it.getUserId(), it.getApproveOrderNo().getCreator())) .collect(Collectors.toSet()); - Map userMap = userRepository.findByEmployeeNoIn(employeeNoSet) + List byEmployeeNoIn = userRepository.findByEmployeeNoIn(employeeNoSet); + Map userMap = byEmployeeNoIn .stream() .collect(Collectors.toMap(User::getEmployeeNo, Function.identity())); List orders = routeOrders diff --git a/src/main/java/com/chint/infrastructure/echo_framework/repository/AbstractGenericRepository.java b/src/main/java/com/chint/infrastructure/echo_framework/repository/AbstractGenericRepository.java index 12752f4f..6f67a834 100644 --- a/src/main/java/com/chint/infrastructure/echo_framework/repository/AbstractGenericRepository.java +++ b/src/main/java/com/chint/infrastructure/echo_framework/repository/AbstractGenericRepository.java @@ -149,7 +149,7 @@ public abstract class AbstractGenericRepository { } // Step 5: Return the complete list - return inCacheList; + return inCacheList.stream().filter(Objects::nonNull).collect(Collectors.toList()); } public List findByFieldsIn(String fieldPrefix, diff --git a/src/main/java/com/chint/interfaces/rest/data_center/user/BatchUserWorker.java b/src/main/java/com/chint/interfaces/rest/data_center/user/BatchUserWorker.java index 686681a4..89b3a6e5 100644 --- a/src/main/java/com/chint/interfaces/rest/data_center/user/BatchUserWorker.java +++ b/src/main/java/com/chint/interfaces/rest/data_center/user/BatchUserWorker.java @@ -247,6 +247,4 @@ public class BatchUserWorker { } return list.isEmpty(); } - - } diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index a0b8d092..1492d61a 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -313,9 +313,9 @@ class RouteApplicationTests { @Test void loginSign() { - String sfno = "221108016"; + String sfno = "230615020"; String syscode = "FSSC"; - String billcode = "CLSQ240620004123"; + String billcode = "CLSQ240225000099"; String companycode = "正泰集团股份有限公司"; String timespan = "1708908662738"; String s = Digest.md5(sfno + syscode + billcode + companycode + LOGIN_SECRET_KEY + timespan); @@ -324,7 +324,7 @@ class RouteApplicationTests { @Test void loginSignProd() { - String sfno = "231026051"; + String sfno = "230615020"; String syscode = "FSSC"; String billcode = "CLSQ240225000099"; String companycode = "正泰集团股份有限公司";