From 0520a55a899fabaca498cbfa2cc29878b2f99cac Mon Sep 17 00:00:00 2001 From: Yao <734770036@qq.com> Date: Fri, 4 Oct 2024 11:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=94=9F=E6=B4=BB=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/PayLogic.php | 10 +++++++--- app/common/logic/PayNotifyLogic.php | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/api/logic/PayLogic.php b/app/api/logic/PayLogic.php index b9ea3856..e279d9eb 100755 --- a/app/api/logic/PayLogic.php +++ b/app/api/logic/PayLogic.php @@ -850,14 +850,18 @@ class PayLogic extends Logic } - LocalGoodsOrder::where('lsg_order_id',$post['lsg_order_id'])->update( + $goods_order = LocalGoodsOrder::where('lsg_order_id',$post['lsg_order_id'])->update( [ 'post_station_id'=>$post['post_station_id'], - 'post_station_time'=>$post_station_time - + 'post_station_time'=>$post_station_time, + 'state'=>1 ] ); + if(!$goods_order){ + Db::rollback(); + return JsonServer::error('订单处理失败'); + } diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 71c3ce57..7a99fba2 100755 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -251,6 +251,9 @@ class PayNotifyLogic $d['pay_status'] = 1; $order['lstore_id']= $result['local_id']; $r = Db::name("local_pay")->where("id",$result['id'])->update($d); + Db::name('local_goods_order')->where("lsg_order_id",$result['lsg_order_id'])->update([ + 'state'=>1 + ]); } $order['id']= $result['id']; $order['type']= 4;