diff --git a/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java b/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java index 80ddb7cb6e0e1f33ac690bfeade3fd587934a31b..a2ea14bf66575627b7afe20a69ba632396bc2c2b 100644 --- a/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java +++ b/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java @@ -3889,14 +3889,16 @@ public class OrderQueryServiceImpl implements OrderQueryService { } // 判æ–å‘货人是å¦æ˜¯å½“å‰ç™»å½•äºº Long customerId = dto.getConsignorVO().getCustomerId(); - List<CustomerContactsDO> consigneeCustomerList = customerContactsService.getCustomerContactsListByCustomerId(customerId); - CustomerContactsDO customerContactsDO = consigneeCustomerList.stream().filter(val -> Objects.equals(val.getIsDefault(), 1)).findFirst().orElse(null); + String phone = dto.getConsignorVO().getPhone(); + List<CustomerContactsDO> consignorCustomerList = customerContactsService.getCustomerContactsListByCustomerId(customerId); + CustomerContactsDO customerContactsDO = consignorCustomerList.stream().filter(val -> Objects.equals(val.getPhoneNew(), phone)).findFirst().orElse(null); if (Objects.equals(customerContactsDO.getPhoneNew(),user.getMobile())){ return success(true); } Long customerId1 = dto.getConsigneeVO().getCustomerId(); - List<CustomerContactsDO> consignorCustomerList1 = customerContactsService.getCustomerContactsListByCustomerId(customerId1); - CustomerContactsDO customerContactsDO1 = consignorCustomerList1.stream().filter(val -> Objects.equals(val.getIsDefault(), 1)).findFirst().orElse(null); + String phone1 = dto.getConsigneeVO().getPhone(); + List<CustomerContactsDO> consigneeCustomerList = customerContactsService.getCustomerContactsListByCustomerId(customerId1); + CustomerContactsDO customerContactsDO1 = consigneeCustomerList.stream().filter(val -> Objects.equals(val.getPhoneNew(), phone1)).findFirst().orElse(null); List<OrderControlLogDO> orderControlLogListByOrderIdList = orderControlLogService.getOrderControlLogListByOrderId(orderId, null); boolean isFirstAllAllow = false; int count = 0; // 新增计数器