From 168bb942745795e91677d1e7edbd2365a7a65f90 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 8 May 2024 09:41:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/RetailOrderController.php | 20 +++++++++++++++++++ app/common/logic/PayNotifyLogic.php | 1 + 2 files changed, 21 insertions(+) diff --git a/app/api/controller/order/RetailOrderController.php b/app/api/controller/order/RetailOrderController.php index c1d5cb5..ffe6731 100644 --- a/app/api/controller/order/RetailOrderController.php +++ b/app/api/controller/order/RetailOrderController.php @@ -189,4 +189,24 @@ class RetailOrderController extends BaseApiController return $this->fail('取消失败'); } + /** + * 确认收货 + */ + public function confirm_receipt(){ + $order_id = (int)$this->request->post('order_id'); + $where=[ + 'id'=>$order_id, + 'uid'=>$this->userId, + 'paid'=>1, + 'status'=>1, + ]; + $order=Cashierclass::where($where)->find(); + if($order){ + $data=['status'=>2]; + Cashierclass::where($where)->update($data); + return $this->success('确认成功'); + } + return $this->fail('确认失败'); + + } } \ No newline at end of file diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index adac982..15c40ca 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -54,6 +54,7 @@ class PayNotifyLogic extends BaseLogic $order = Cashierclass::where('number', $orderSn)->findOrEmpty(); $order->money = bcdiv($extra['amount']['payer_total'],100,2); $order->paid = 1; + $order->status = 1; $order->save(); if ($order['cart_id']) { if (!is_array($order['cart_id'])) {