customer_412
This commit is contained in:
@@ -257,7 +257,7 @@ class Customer extends HD_Controller
|
||||
//获取销售员
|
||||
$row_admin = $this->app_licheb_users_model->get(array('id' => $row['admin_id']), 'id,uname');
|
||||
//操作日志
|
||||
$rows_log = $this->customer_oplogs_model->select(array('customer_id' => $id), 'c_time desc', 0, 0);
|
||||
$rows_log = $this->customer_oplogs_model->select(array('customer_id' => $id), 'id desc', 0, 0);
|
||||
//用户信息
|
||||
if (SUPER_ADMIN == $this->role || 35 == $this->role) {
|
||||
$mobile_sub = $row['mobile'];
|
||||
|
||||
@@ -270,7 +270,7 @@ class Customers extends Wxapp
|
||||
//];
|
||||
$this->load->library('receiver/customers_entity');
|
||||
$level = $this->customers_entity->cal_level($buy_time);
|
||||
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$add_data = [
|
||||
'name' => $name,
|
||||
'mobile' => $mobile,
|
||||
@@ -282,12 +282,13 @@ class Customers extends Wxapp
|
||||
'level' => $level,
|
||||
'cf_title' => '自有资源',
|
||||
//'car_json' => json_encode($car_json, JSON_UNESCAPED_UNICODE),
|
||||
'cont_time' => date('Y-m-d H:i:s'),
|
||||
'cont_time' => $time,
|
||||
'status' => $status,
|
||||
'c_time' => time()
|
||||
];
|
||||
if ($status == 1) {//到店客户 到店次数默认1
|
||||
$add_data['a_num'] = 1;
|
||||
$add_data['dt_time'] = $time;
|
||||
}
|
||||
$biz_row['city_id'] && $add_data['city_id'] = $biz_row['city_id'];
|
||||
$biz_row['county_id'] && $add_data['county_id'] = $biz_row['county_id'];
|
||||
@@ -315,9 +316,13 @@ class Customers extends Wxapp
|
||||
$this->mdCustomerTagdata->add_batch($add_tag);
|
||||
}
|
||||
}
|
||||
$uid = $this->session['uid'];
|
||||
$uname = $this->session['uname'];
|
||||
$this->load->library('receiver/customers_entity');
|
||||
$this->customers_entity->add_log($id, $this->session['uid'], $uname, "创建客户");
|
||||
$this->customers_entity->add_log($id, $uid, $uname, "创建客户");
|
||||
if ($status == 1) {//到店客户加日志
|
||||
$this->customers_entity->add_log($id, $uid, $uname, "到店+1");
|
||||
}
|
||||
throw new Exception('创建成功', API_CODE_SUCCESS);
|
||||
} else {
|
||||
throw new Exception('创建失败', ERR_PARAMS_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user