From 8c55a4e04ddc7dc1b23b624973a2cdeb68cb713e Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 28 Aug 2023 19:06:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=80=E8=B4=A7=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/order/StoreOrderRepository.php | 2 +- app/controller/api/store/order/StoreRefundOrder.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 182a78f6..5465cf87 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -1715,7 +1715,7 @@ class StoreOrderRepository extends BaseRepository } else { $query = $this->dao->search($where)->where($this->getOrderType($status))->where('StoreOrder.is_del', 0); } - + $count = $query->count(); $list = $query->with([ 'orderProduct', diff --git a/app/controller/api/store/order/StoreRefundOrder.php b/app/controller/api/store/order/StoreRefundOrder.php index 4c9e6625..e6c11ca3 100644 --- a/app/controller/api/store/order/StoreRefundOrder.php +++ b/app/controller/api/store/order/StoreRefundOrder.php @@ -130,7 +130,9 @@ class StoreRefundOrder extends BaseController if (!$order->refund_status) return app('json')->fail('订单已过退款/退货期限'); if ($order->status < 0) return app('json')->fail('订单已退款'); - if ($order->status == 1) return app('json')->fail('订单已发货不支持退款'); + if ($order->activity_type == 0) { + if ($order->status == 1) return app('json')->fail('订单已发货不支持退款'); + } if ($order->status == 10) return app('json')->fail('订单不支持退款'); if($order->is_virtual && $data['refund_type'] == 2) return app('json')->fail('订单不支持退款退货'); if ($type == 1) {