From fa559efd5c87af336690f1462db835e773fde1d7 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 29 Jul 2024 15:06:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(OrderController):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8B=86=E5=8D=95=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=80=80=E6=AC=BE=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/order/OrderController.php | 6 +++--- app/api/logic/order/OrderLogic.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index be00fdfb..299cbc2b 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -456,9 +456,9 @@ class OrderController extends BaseApiController $params = (new OrderValidate())->post()->goCheck('add'); $uid = $this->userId; //拆单逻辑 - OrderLogic::dealRefund($uid, $params); - $detail = StoreOrder::where('id', $params['id'])->where('refund_type',1)->where('status','in',[0,1])->find(); - if($detail){ + $res=OrderLogic::dealRefund($uid, $params); + $detail = StoreOrder::where('id', $params['id'])->where('refund_type',1)->find(); + if($detail && $res!=2){ $res=StoreOrderLogic::refund($detail,['order_id'=>$detail['order_id']]); if($res!=false){ return $this->success($res); diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 77353be0..d6e84dff 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -832,7 +832,7 @@ class OrderLogic extends BaseLogic } } - return 1; + return $order['status']??1; } From 6879da096826c6a4293df7ffbecac191008647f6 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 29 Jul 2024 15:59:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AF=B9store=5F?= =?UTF-8?q?id=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/logic/WorkbenchLogic.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/store/logic/WorkbenchLogic.php b/app/store/logic/WorkbenchLogic.php index 9adaf4a7..6988ba07 100644 --- a/app/store/logic/WorkbenchLogic.php +++ b/app/store/logic/WorkbenchLogic.php @@ -66,6 +66,7 @@ class WorkbenchLogic extends BaseLogic $storeFinanceWhere['store_id'] = $params['store_id']; $storeFinanceWhereTwo['store_id'] = $params['store_id']; $attritionWhere['id'] = $params['store_id']; + $all_where['store_id'] = $params['store_id']; } $orderLogic = new StoreOrderLogic(); //订单总金额