From be4dcb4dd4b5bd04439253a552466f59175b5c9a Mon Sep 17 00:00:00 2001 From: mzl Date: Tue, 4 Nov 2025 13:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A2=9E=E5=8A=A0=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/StockOrdersService.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/common/service/StockOrdersService.php b/app/common/service/StockOrdersService.php index 9d5e4df..6da7a24 100644 --- a/app/common/service/StockOrdersService.php +++ b/app/common/service/StockOrdersService.php @@ -1114,5 +1114,17 @@ class StockOrdersService } - + public function serviceDestroy(Request $request, string $scene = 'destroy') + { + $config = $this->buildQueryConfig($request, $scene); + $item = $this->logicShow($config); + if (!$item) { + throw new BusinessException('数据不存在'); + } + if ($item->approval_status == 1 || $item->approval_status == 2) { + throw new BusinessException('审核中或者已审核的订单不能删除'); + } + $deleted = $this->logicDeleteBy($config); + return $this->postProcess(ucfirst($scene), $deleted); + } } \ No newline at end of file