This commit is contained in:
weiz 2023-09-05 22:41:18 +08:00
parent a31478d730
commit e9211ca9e8

View File

@ -224,6 +224,12 @@ class LogisticsLogic extends BaseLogic
'content' => '已提交订单', 'content' => '已提交订单',
'create_time' => time(), 'create_time' => time(),
]); ]);
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(); $register_id = Courier::filed('register_id')->where('id',$courier['user_id'])->find();
if($register_id && !empty($register_id['register_id'])){ if($register_id && !empty($register_id['register_id'])){
@ -232,12 +238,6 @@ class LogisticsLogic extends BaseLogic
Log::write('["极光推送:"]'.$push_result['msg'],'error'); 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()];
}
} }
/* /*