修改
This commit is contained in:
parent
f74fc4e153
commit
78b9154624
|
|
@ -4,6 +4,7 @@ namespace app\admin\controller;
|
|||
|
||||
use app\admin\addresmart\Address;
|
||||
use app\admin\controller\orders\DispatchLogic;
|
||||
use app\admin\model\Admin;
|
||||
use app\admin\model\Message;
|
||||
use app\admin\model\order\Invoice;
|
||||
use app\admin\model\OrderDispatch;
|
||||
|
|
@ -413,16 +414,26 @@ class Order extends Backend
|
|||
|
||||
public function reminder($ids = null)
|
||||
{
|
||||
if ($ids) {
|
||||
$order = $this->model->where('id', $ids)->find();
|
||||
}
|
||||
|
||||
Message::create([
|
||||
'to_id' => $order->admin_id,
|
||||
'type' => 1,
|
||||
'title' => '订单报错通知',
|
||||
'content' => '【订单报错通知】您有一条订单号为'.$order->order_no.'的订单订单信息录入错误,请前往报错订单界面进行查看,并立即处理!'
|
||||
]);
|
||||
$order = $this->model->where('id', $ids)->find();
|
||||
|
||||
$area_id = substr($order->area_id,0,4);
|
||||
|
||||
$res = Admin::where('area_ids','like','%'.$area_id.'%')
|
||||
->column('id');
|
||||
|
||||
|
||||
$insert = [];
|
||||
foreach ($res as $re){
|
||||
$insert [] = [
|
||||
'to_id' => $re,
|
||||
'type' => 1,
|
||||
'title' => '订单报错通知',
|
||||
'content' => '【催单通知】您有一条订单号为'.$order->order_no.'的订单被催单,请立即派单!'
|
||||
];
|
||||
}
|
||||
$build = new Message();
|
||||
$build->saveAll($insert);
|
||||
|
||||
$this->success($order['order_no']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user