From 04f6b813dff144af30e1e19d69e104f97fcc0c92 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Wed, 12 Jul 2023 17:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BF=A1=E7=94=A8=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/store/order/StoreOrderInterest.php | 2 +- app/common/repositories/store/order/StoreOrderRepository.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();