通知
This commit is contained in:
parent
10412e6596
commit
eae143512f
|
|
@ -31,8 +31,14 @@ class CheckOrdeRecordCommand extends Command
|
|||
foreach ($list as $item) {
|
||||
$ids[] = $item->id;
|
||||
$dispatchIds[] = $item->dispatch_id;
|
||||
|
||||
$existDispatchIds = [];
|
||||
|
||||
//修改状态
|
||||
if($item->need_notice == 1){ //需要通知
|
||||
if(in_array($item->dispatch_id,$existDispatchIds)){
|
||||
continue;
|
||||
}
|
||||
$dispatch = OrderDispatch::get($item->dispatch_id,['orderb']);
|
||||
Message::create([
|
||||
'to_id' => $dispatch->admin_id,
|
||||
|
|
@ -40,6 +46,8 @@ class CheckOrdeRecordCommand extends Command
|
|||
'title' => '派单任务跟进提示',
|
||||
'content' => '【订单跟进提示】您有一条待跟进订单,订单编号:'.$dispatch->orderb->order_no.',请及时关注。'
|
||||
]);
|
||||
|
||||
$existDispatchIds[] = $item->dispatch_id;
|
||||
}
|
||||
}
|
||||
OrderDispatchRecord::whereIn('id',$ids)->where('status',0)->update(['status'=>1]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user