diff --git a/app/common/model/store/order/StoreOrderInterest.php b/app/common/model/store/order/StoreOrderInterest.php index 7abcd2b7..7027a4e1 100644 --- a/app/common/model/store/order/StoreOrderInterest.php +++ b/app/common/model/store/order/StoreOrderInterest.php @@ -9,7 +9,7 @@ class StoreOrderInterest extends BaseModel const STATUS_SETTLED = 1; //已结算 const STATUS_UNSETTLED = 0; //未结算 - const STATUS_DELETED = 1; //已删除 + const STATUS_DELETED = -1; //已删除 public static function tablePk(): ?string { diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 2219475f..50dbf0f5 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -2453,7 +2453,7 @@ class StoreOrderRepository extends BaseRepository if (!$groupOrder) { throw new Exception('订单不存在或已支付'); } - if (!$groupOrder->interest || $groupOrder->interest->status == StoreOrderInterest::STATUS_SETTLED) { + if (!$groupOrder->interest || $groupOrder->interest->status != StoreOrderInterest::STATUS_UNSETTLED) { throw new Exception('订单无需结算'); } $interest = $groupOrder->interest->calculateInterest();