Merge branch 'feature/purchase_record' into dev

This commit is contained in:
luofei 2023-07-12 17:52:00 +08:00
commit ad9142fe89

View File

@ -2453,7 +2453,8 @@ class StoreOrderRepository extends BaseRepository
if (!$groupOrder) {
throw new Exception('订单不存在或已支付');
}
if (!$groupOrder->interest || $groupOrder->interest->status != StoreOrderInterest::STATUS_UNSETTLED) {
$order = $groupOrder->orderList[0];
if (!$groupOrder->interest || $groupOrder->interest->status != StoreOrderInterest::STATUS_UNSETTLED || $order->status != 2) {
throw new Exception('订单无需结算');
}
$interest = $groupOrder->interest->calculateInterest();