From 3ea66b38f8702cba5c377ca326bdf02faa92a679 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Tue, 14 Oct 2025 11:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=AE=A2=E5=8D=95=E5=88=86?= =?UTF-8?q?=E8=B4=A6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/impl/OrderBasicInfoServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index 73c5b9e43..07047c300 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -5808,7 +5808,11 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService { } // 查询是订单的历史分账记录 - stationSplitConfigList = queryOrderSplitConfigList(orderCode); + List stationSplitConfigs = queryOrderSplitConfigList(orderCode); + // 如果stationSplitConfigs不为空,stationSplitConfigList替换为stationSplitConfigs + if (CollectionUtils.isNotEmpty(stationSplitConfigs)) { + stationSplitConfigList = stationSplitConfigs; + } // 计算每个参与分账的用户, 应分多少钱 List splitDataList = calculationSplitDataList(stationSplitConfigList, afterSettleOrderDTO); @@ -5876,6 +5880,10 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService { List resultList = Lists.newArrayList(); List orderSplitRecordList = orderSplitRecordService.queryAllOrderSplitRecord(orderCode); + if (CollectionUtils.isEmpty(orderSplitRecordList)) { + // 订单没有分账记录 + return resultList; + } // 根据createTime分组 Map> map = orderSplitRecordList.stream().collect(Collectors.groupingBy(OrderSplitRecord::getCreateTime));