wangyingyang

fix

......@@ -440,13 +440,6 @@ public class ClientCustomerServiceImpl implements ClientCustomerService {
notOrderedHisCustomers = currentCustomers.stream().filter(c -> !mappingHisCustomerIds.contains(c.getId())).collect(
Collectors.toList());
if (customerIds.isEmpty()) {
return TodayOrderDto.builder()
.totalCurrentCustomerCount(0)
.notOrderCustomers(new ArrayList<>())
.build();
}
final var operatorLoginInfo = LoginContextHolder.getLoginInfo();
LocalDate today = LocalDate.now();
LocalDateTime todayZero = today.atStartOfDay();
......@@ -461,7 +454,11 @@ public class ClientCustomerServiceImpl implements ClientCustomerService {
.shouldFilterMealTimeEnd(true)
.mealTimeEnd(tomorrowZero)
.build();
final var orderedResponseList = orderServiceRpcClient.getOrdersByCondition(queryOrderDto);
List<SingleClientCustomerOrderRpcResponse> orderedResponseList = new ArrayList<>();
if (!customerIds.isEmpty()) {
orderedResponseList = orderServiceRpcClient.getOrdersByCondition(queryOrderDto);
}
List<Integer> uniqueOrderedCustomerIds = orderedResponseList.stream().map(
SingleClientCustomerOrderRpcResponse::getCustomerId).distinct()
.collect(Collectors.toList());
......