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;