修改生成订单时消息推送逻辑
This commit is contained in:
parent
e2c2a776f9
commit
8921d0c70e
@ -243,17 +243,19 @@ class LogisticsLogic extends BaseLogic
|
||||
return ['code'=>0, 'msg'=>$e->getMessage()];
|
||||
}
|
||||
//推送消息
|
||||
$register_id = Courier::field('register_id')->where('id',$courier['user_id'])->find();
|
||||
if($register_id && !empty($register_id['register_id'])){
|
||||
$push_result1 = push_message($register_id['register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
$push_result2 = push_message($register_id['register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
if($push_result1['code'] == 0) {
|
||||
Log::write('["极光推送:"]'.$push_result1['msg'],'error');
|
||||
}
|
||||
if($push_result2['code'] == 0) {
|
||||
Log::write('["极光推送:"]'.$push_result2['msg'],'error');
|
||||
}
|
||||
}
|
||||
$register_id = Courier::field('register_id,ytj_register_id')->where('id',$courier['user_id'])->findOrEmpty();
|
||||
if(!$register_id->isEmpty() && !empty($register_id['register_id'])){
|
||||
$push_result = push_message($register_id['register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
if($push_result['code'] == 0) {
|
||||
Log::write('["极光推送:"]'.$push_result['msg'],'error');
|
||||
}
|
||||
}
|
||||
if(!$register_id->isEmpty() && !empty($register_id['ytj_register_id'])){
|
||||
$push_result = push_message($register_id['ytj_register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
if($push_result['code'] == 0) {
|
||||
Log::write('["极光推送:"]'.$push_result['msg'],'error');
|
||||
}
|
||||
}
|
||||
return ['code'=>1, 'msg'=>'操作成功','data'=>['nickname'=>$courier['master_name'],'phone'=>$courier['master_phone']]];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user