From 859dbe59703ae3dd330789f41665244eafe1e88e Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Sat, 16 Mar 2024 11:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E7=A4=BC=E5=8C=85?= =?UTF-8?q?=E9=99=90=E8=B4=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/Enum.php | 10 ++++++++++ .../store/order/StoreOrderCreateRepository.php | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/common/Enum.php b/app/common/Enum.php index c372a3c9..ff84b725 100644 --- a/app/common/Enum.php +++ b/app/common/Enum.php @@ -22,6 +22,16 @@ class Enum /** 购物车下单支付**/ const public = 10;//对公账户 + /** 订单状态 **/ + const STATUS_WAIT_DELIVERY = 0;//待发货 + const STATUS_WAIT_RECEIPT = 1;//待发货 + const STATUS_WAIT_COMMENT = 2;//待评价 + const STATUS_FINISHED = 3;//已完成 + const STATUS_GROUPING = 9;//拼团中 + const STATUS_WAIT_PAY = 10;//待付尾款 + const STATUS_TIME_OUT = 11;//尾款超时 + const STATUS_REFUNDED = -1;//已退款 + /** @const MAP */ const MAP = [ diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 826c10ad..fd1d988a 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -125,8 +125,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository ->leftJoin('store_order_product t2', 't1.order_id = t2.order_id') ->whereIn('product_id', $productIds) ->where('t1.uid', $uid) - ->where('paid', 1) - ->where('is_refund', 0) + ->where('is_del', 0) + ->where('is_system_del', 0) + ->where('status', '<>', Enum::STATUS_REFUNDED) ->count(); if ($orderRecord > 0) { throw new ValidateException('大礼包仅能购买一次');