log
This commit is contained in:
@@ -20,6 +20,7 @@ class Cusorder extends Wxapp
|
||||
$this->load->model('receiver/receiver_customers_model', 'customers_model');
|
||||
$this->load->model('receiver/order/receiver_orders_model', 'orders_model');
|
||||
$this->load->model('receiver/order/receiver_order_datas_model');
|
||||
$this->load->model('receiver/order/receiver_order_oplogs_model');
|
||||
|
||||
$this->load->model('auto/auto_brand_model');
|
||||
$this->load->model('auto/auto_series_model');
|
||||
@@ -220,11 +221,36 @@ class Cusorder extends Wxapp
|
||||
}
|
||||
$res = $this->orders_model->update(['status' => $status], ['id' => $id]);
|
||||
if ($res) {
|
||||
//数据提交汽车之家
|
||||
$res = $this->orders_entity->post_auto($id);
|
||||
if (!$res['code']) {
|
||||
throw new Exception('网络错误,请联系管理员', ERR_PARAMS_ERROR);
|
||||
|
||||
//记日志
|
||||
$uid = $this->session['uid'];
|
||||
$user = $this->app_user_model->get(array('id' => $uid));
|
||||
|
||||
$log = array(
|
||||
'order_id' => $id,
|
||||
'uid' => $uid,
|
||||
'uname' => $user['uname'],
|
||||
'type' => 0,
|
||||
'cf_platform' => '理车宝',
|
||||
'c_time' => time(),
|
||||
);
|
||||
|
||||
switch ($status){
|
||||
case 1:
|
||||
$log['log'] = '下定信息审核通过';
|
||||
case 2:
|
||||
$log['log'] = '开票信息审核通过';
|
||||
case 3:
|
||||
$log['log'] = '车辆交付审核通过';
|
||||
}
|
||||
|
||||
$this->receiver_order_oplogs_model->add($log);
|
||||
|
||||
//数据提交汽车之家
|
||||
// $res = $this->orders_entity->post_auto($id);
|
||||
// if (!$res['code']) {
|
||||
// throw new Exception('网络错误,请联系管理员', ERR_PARAMS_ERROR);
|
||||
// }
|
||||
throw new Exception('审核通过,操作成功', API_CODE_SUCCESS);
|
||||
} else {
|
||||
throw new Exception('操作失败,请联系管理员', ERR_PARAMS_ERROR);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Receiver_order_oplogs_model extends HD_Model
|
||||
{
|
||||
private $table_name = 'lc_receiver_order_oplogs';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($this->table_name, 'default');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user