From 9a494d4db373d554a0c87c5f0a57ce309397d530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Fri, 9 Oct 2026 09:55:52 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(=E8=AE=A2=E5=8D=95=E4=B8=AD?= =?UTF-8?q?=E5=8F=B0):=20=E7=AE=A1=E7=90=86=E7=AB=AF=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=A1=BB=E4=BB=A5=E7=94=A8=E6=88=B7=E5=B7=B2?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=BA=E5=89=8D=E6=8F=90"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 34b0f65d531ed0f4a4206e74a16de3d20876f702. --- backend/app/services/order/OrderCenterServices.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/backend/app/services/order/OrderCenterServices.php b/backend/app/services/order/OrderCenterServices.php index ee1d62968..252e47367 100644 --- a/backend/app/services/order/OrderCenterServices.php +++ b/backend/app/services/order/OrderCenterServices.php @@ -20,7 +20,6 @@ use crmeb\trade\order\type\OrderCenterSyncInterface; use crmeb\trade\mode\TradeModeRegistry; use crmeb\trade\product\ProductTypeRegistry; use crmeb\utils\SnowflakeIdGenerator; -use crmeb\exceptions\ApiException; use app\dao\driver\pay\PayChannelDao; use app\dao\user\UserBillDao; use think\facade\Log; @@ -2611,21 +2610,12 @@ class OrderCenterServices extends BaseService implements OrderCenterSyncInterfac } /** - * 软删除订单(管理端) - * 仅允许删除用户端已删除的订单,用户未删除的订单不能直接删除 + * 软删除订单 * @param int $id 订单中台记录ID * @return bool 返回是否删除成功 - * @throws ApiException 订单不存在或用户未删除时抛出 */ public function delete(int $id): bool { - $orderInfo = $this->dao->get(['id' => $id]); - if (!$orderInfo) { - throw new ApiException('订单不存在'); - } - if (!(int)($orderInfo['is_del'] ?? 0)) { - throw new ApiException('订单未被用户删除,不能删除'); - } return $this->dao->update(['id' => $id], ['is_del' => 1]) !== false; }