From 3bf903494040192941726363cf319a284b673d9a Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Sat, 15 Jan 2022 15:32:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=A2=E5=8D=95=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Endpoint/Api/Filters/DealerOrderFilter.php | 2 +- app/Models/DealerOrder.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Endpoint/Api/Filters/DealerOrderFilter.php b/app/Endpoint/Api/Filters/DealerOrderFilter.php index ca7f98d0..df99b425 100644 --- a/app/Endpoint/Api/Filters/DealerOrderFilter.php +++ b/app/Endpoint/Api/Filters/DealerOrderFilter.php @@ -15,7 +15,7 @@ class DealerOrderFilter extends ModelFilter case 'wait_pay'://待付款 $this->onlyPendinged(); break; - case 'wait_shipping'://待发货 + case 'wait_paid'://待收款 $this->onlyPaid(); break; case 'wait_shippinged'://待收货 diff --git a/app/Models/DealerOrder.php b/app/Models/DealerOrder.php index 21d6e7c9..88157f65 100644 --- a/app/Models/DealerOrder.php +++ b/app/Models/DealerOrder.php @@ -71,9 +71,7 @@ class DealerOrder extends Model */ public function scopeOnlyPaid($query) { - return $query->whereBetween('status', [ - DealerOrderStatus::Confirming, DealerOrderStatus::Shipped, - ]); + return $query->where('status', DealerOrderStatus::Confirming); } /** @@ -81,7 +79,9 @@ class DealerOrder extends Model */ public function scopeOnlyShipping($query) { - return $query->where('status', DealerOrderStatus::Shipped); + return $query->whereIn('status', [ + DealerOrderStatus::Confirming, DealerOrderStatus::Paid, DealerOrderStatus::Shipped, + ]); } /**