userslog_422_2

This commit is contained in:
dengbw
2022-04-22 17:39:37 +08:00
parent 83a6f8ee13
commit 0e11a46cd1
3 changed files with 16 additions and 4 deletions
+2 -1
View File
@@ -30,9 +30,10 @@ Class Lichene extends HD_Controller
*/
public function temp()
{
$param = $this->input->get();
$this->load->library('wx_qyapi', ['app' => 'lichene']);
// $re_wx = $this->wx_qyapi->getSignPackage();
$re_wx = $this->wx_qyapi->get_external_contact(array('url' => 'user_get', 'userid' => 'LiuXinXin_2'));
$re_wx = $this->wx_qyapi->get_external_contact($param);
echo json_encode($re_wx, JSON_UNESCAPED_UNICODE);
}
@@ -26,7 +26,8 @@ class Receiver_customer_oplogs_model extends HD_Model
*/
public function typeAry($id = 0)
{
$arr = [0 => '小记', 1 => '发短信', 2 => '拨打号码', 3 => '创建', 4 => '到店', 5 => '试驾', 6 => '订单', 7 => '战败'];
$arr = [0 => '小记', 1 => '发短信', 2 => '拨打号码', 3 => '创建', 4 => '到店', 5 => '试驾', 6 => '订单', 7 => '战败'
, 8 => '企微跟进'];
if ($id) {
return $arr[$id];
} else {
+12 -2
View File
@@ -251,8 +251,18 @@ class Persona extends CI_Controller
'c_time' => time()
];
$c_id = $this->mdCustomers->add($add_data);
$this->customers_entity->add_log($c_id, $admin_id, $admin_name, '创建客户档案', 3);
$this->customers_entity->add_log($c_id, $admin_id, $admin_name, "客户到店", 4);
if ($c_id) {//加日志
$this->load->model('app/app_lichene_qy_log_model', 'mdWechatqyLog');
$res_log = $this->mdWechatqyLog->select(['external_userid' => $userInfo['external_userid']
, 'userid' => $userInfo['userid']], 'c_time asc', 0, 0, 'remark');
if ($res_log) {//企微跟进
foreach ($res_log as $key => $val) {
$this->customers_entity->add_log($c_id, $admin_id, $admin_name, $val['remark'], 8);
}
}
$this->customers_entity->add_log($c_id, $admin_id, $admin_name, '创建客户档案', 3);
$this->customers_entity->add_log($c_id, $admin_id, $admin_name, "客户到店", 4);
}
} else {
$c_id = $re_cus['id'];
!$re_cus['unionid'] && $up_data['unionid'] = $userInfo['unionid'];