diff --git a/app/api/logic/LogisticsLogic.php b/app/api/logic/LogisticsLogic.php index cf7cc489..6765d68d 100644 --- a/app/api/logic/LogisticsLogic.php +++ b/app/api/logic/LogisticsLogic.php @@ -224,20 +224,20 @@ class LogisticsLogic extends BaseLogic 'content' => '已提交订单', 'create_time' => time(), ]); - //推送消息 - $register_id = Courier::filed('register_id')->where('id',$courier['user_id'])->find(); - if($register_id && !empty($register_id['register_id'])){ - $push_result = push_message($register_id[0],'您有一条新的配送任务,请尽快处理!!'); - if($push_result['code'] == 0) { - Log::write('["极光推送:"]'.$push_result['msg'],'error'); - } - } Logistics::commit(); return ['code'=>1, 'msg'=>'操作成功','data'=>['nickname'=>$courier['master_name'],'phone'=>$courier['master_phone']]]; } catch (\Exception $e) { Logistics::rollback(); return ['code'=>0, 'msg'=>$e->getMessage()]; } + //推送消息 + $register_id = Courier::filed('register_id')->where('id',$courier['user_id'])->find(); + if($register_id && !empty($register_id['register_id'])){ + $push_result = push_message($register_id[0],'您有一条新的配送任务,请尽快处理!!'); + if($push_result['code'] == 0) { + Log::write('["极光推送:"]'.$push_result['msg'],'error'); + } + } } /*