persona_601
This commit is contained in:
@@ -66,6 +66,25 @@ class Customers_entity
|
||||
return '';
|
||||
}
|
||||
}
|
||||
if ($type == 6) {//订单客户
|
||||
$count_4 = $this->ci->customer_oplogs_model->count(['customer_id' => $customer_id, 'type' => 4]);
|
||||
if (!$count_4) {//无到店日志
|
||||
$this->ci->load->model('receiver/receiver_customers_model', 'mdCustomers');
|
||||
$re_cus = $this->ci->mdCustomers->get(['id' => $customer_id]);
|
||||
if ($re_cus['status'] == 0) {
|
||||
$up_data = ['status' => 1, 'a_num' => 1, 'cont_time' => date('Y-m-d H:i:s')];//改成到店客户
|
||||
if ($re_cus['dt_time'] == '0000-00-00 00:00:00') {//首次到店时间
|
||||
$up_data['dt_time'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
$this->ci->mdCustomers->update($up_data, ['id' => $customer_id]);
|
||||
$this->add_log($customer_id, $uid, $uname, '客户到店', 4);
|
||||
} else if ($re_cus['status'] == 1) {
|
||||
$up_data['a_num = a_num+1'] = null;
|
||||
$this->ci->mdCustomers->update($up_data, ['id' => $customer_id]);
|
||||
$this->add_log($customer_id, $uid, $uname, '客户再次到店', 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
$add_data = [
|
||||
'customer_id' => $customer_id,
|
||||
'uid' => $uid,
|
||||
|
||||
@@ -229,7 +229,8 @@ class Persona extends CI_Controller
|
||||
$c_id = $userInfo['c_id'];
|
||||
$result = $re_cus = '';
|
||||
if ($c_id) {//已存在客户,更新资料
|
||||
$up_data = ['of_id' => $params['of_id'], 'of2_id' => $params['of2_id'], 'buddy_type' => $params['buddy_type']];
|
||||
$up_data = ['of_id' => $params['of_id'], 'of2_id' => $params['of2_id'], 'buddy_type' => $params['buddy_type']
|
||||
, 'wxqy' => 1];
|
||||
$result = $this->mdCustomers->update($up_data, ['id' => $c_id]);
|
||||
$this->customers_entity->add_log($c_id, $userInfo['admin_id'], $userInfo['admin_name'], '修改用户基本信息');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user