...
|
...
|
@@ -104,15 +104,23 @@ class AdminOrderController extends AdminBaseController |
|
|
}
|
|
|
}
|
|
|
$model = new OrderModel();
|
|
|
// 查询订单
|
|
|
$where_order['id'] = $data['id'];
|
|
|
$where_order['status'] = 2;
|
|
|
$order = $model->where($where_order)->find();
|
|
|
if(!$order){
|
|
|
Db::rollback();
|
|
|
$this->apiResponse('0','订单错误');
|
|
|
}
|
|
|
$up_order['id'] = $data['id'];
|
|
|
$up_order['status'] = $data['type'];
|
|
|
$res = $model->isUpdate(true)->save($up_order);
|
|
|
|
|
|
$where_hire['order_id'] = $data['id'];
|
|
|
$where_hire['status'] = array('neq',9);
|
|
|
$hireModel = new HireModel();
|
|
|
$hire_save['id'] = $order['id'];
|
|
|
$hire_save['status'] =$data['type'];
|
|
|
$hire_save['update_time'] = time();
|
|
|
$hire_res = Db::name('Hire')->where($where_hire)->update($hire_save);
|
|
|
$hire_res = $hireModel->isUpdate(true)->save($hire_save);
|
|
|
if($res && $hire_res){
|
|
|
// 发送模板消息
|
|
|
$acctoken = $this->getAccessToken();
|
...
|
...
|
|