user_602
This commit is contained in:
@@ -147,6 +147,9 @@ class Licheb extends HD_Controller
|
||||
foreach ($res as $key => $value) {
|
||||
$sales_id = $id = $value['id'];
|
||||
$biz_id = intval($value['biz_id']);
|
||||
if ($biz_id == 1 || $biz_id == 110) {//门店用户不写入
|
||||
continue;
|
||||
}
|
||||
$where_sal = ['t_day' => $t_day, 'sales_id' => $sales_id, 'biz_id' => $biz_id];
|
||||
$re_sal = $this->mdCustomerVisitSales->get($where_sal);
|
||||
if (!$re_sal) {//判断当天是否已加入
|
||||
@@ -185,7 +188,6 @@ class Licheb extends HD_Controller
|
||||
public function users_log()
|
||||
{
|
||||
$params = $this->input->get();
|
||||
$time = strtotime("-1 day");//昨天此时的时间戳
|
||||
$hour = date('H.i');
|
||||
if (($hour > 00.00 && $hour < 03.00) || $params['sd']) {
|
||||
if ($params['sd']) {
|
||||
@@ -197,13 +199,13 @@ class Licheb extends HD_Controller
|
||||
}
|
||||
$this->load->model('app/licheb/app_licheb_users_model', 'mdUsers');
|
||||
$this->load->model('app/licheb/app_licheb_users_log_model', 'mdUsersLog');
|
||||
$time = strtotime("-1 day");//昨天此时的时间戳
|
||||
$size = 200;//每次最多处理多少条
|
||||
$rds = intval($this->input->get('rds'));
|
||||
$redis = &load_cache('redis');
|
||||
$redisKey = 'app_licheb_users_log_id';
|
||||
$log_date = date('Y-m-d', $time);
|
||||
$re_v = $this->mdUsersLog->get(array('log_date' => $log_date));//查找当天是否有数据
|
||||
if (!$re_v || $rds) {
|
||||
$redisKey = 'app_licheb_users_log_id_' . $log_date;
|
||||
if ($rds) {
|
||||
$redis->delete($redisKey);
|
||||
}
|
||||
$id = $redis->get($redisKey);
|
||||
@@ -225,6 +227,9 @@ class Licheb extends HD_Controller
|
||||
foreach ($res as $key => $value) {
|
||||
$sale_id = $id = $value['id'];
|
||||
$biz_id = intval($value['biz_id']);
|
||||
if ($biz_id == 1 || $biz_id == 110) {//门店用户不写入
|
||||
continue;
|
||||
}
|
||||
$re_log = $this->mdUsersLog->get(['log_date' => $log_date, 'sale_id' => $sale_id, 'biz_id' => $biz_id]);
|
||||
if (!$re_log) {//判断当天是否已加入
|
||||
$s_time = strtotime($log_date . ' 00:00:00');
|
||||
|
||||
@@ -709,6 +709,22 @@ class Customers extends Wxapp
|
||||
throw new Exception('分配成功', API_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:客户待回访tab
|
||||
* Created on: 2022/6/2 10:20
|
||||
* Created by: dengbw
|
||||
* @return array
|
||||
*/
|
||||
protected function get_visit_tabs()
|
||||
{
|
||||
$status = $this->input_param('status');
|
||||
$tabs = [];
|
||||
if ($status == 1) {//跟进客户
|
||||
$tabs = [['name' => '本日新增跟进', 'id' => 1], ['name' => '逾期未跟进', 'id' => 3]];
|
||||
}
|
||||
return ['list' => $tabs];
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:客户回访记录列表
|
||||
* Created on: 2021/10/21 14:27
|
||||
@@ -724,6 +740,7 @@ class Customers extends Wxapp
|
||||
$page = intval($params['page']);
|
||||
$size = intval($params['size']);
|
||||
$status = intval($params['status']);
|
||||
$tab_id = intval($params['visit_tab_id']);
|
||||
!$page && $page = 1;
|
||||
!$size && $size = 10;
|
||||
$t_day = date('Y-m-d');
|
||||
@@ -732,7 +749,11 @@ class Customers extends Wxapp
|
||||
if ($status == 2) {//已跟进
|
||||
$where['b.status'] = 2;
|
||||
} else {
|
||||
$where['b.status<>'] = 2;
|
||||
if ($tab_id) {
|
||||
$where['b.status'] = $tab_id;
|
||||
} else {
|
||||
$where['b.status<>'] = 2;
|
||||
}
|
||||
}
|
||||
$group_id == 1 && $where['a.admin_id'] = $this->session['uid'];
|
||||
$count = $this->mdCustomerVisitData->count_visit($where);
|
||||
|
||||
@@ -341,7 +341,7 @@ class User extends Wxapp
|
||||
, ['title' => '今日需跟进 >', 'num' => $b_num_1, 'url' => '/pages/customer/filterList/index?level=B&status=1&visit=1&title=B级今日需跟进']
|
||||
, ['title' => '今日已跟进 >', 'num' => $b_num_2, 'url' => '/pages/customer/filterList/index?level=B&status=2&visit=1&title=B级今日已跟进']]],
|
||||
];
|
||||
$wl_num = $this->mdCustomerVisitData->count_visit($where_v);
|
||||
$wl_num = $this->mdCustomerVisitData->count_visit(array_merge($where_v, ['b.status<>' => 2]));
|
||||
$data = [
|
||||
'wl_count' => ['title' => '待跟进客户(人)', 'num' => $wl_num, 'url' => '/pages/customer/filterList/index?status=1&visit=1&title=待跟进客户'],
|
||||
'gz_count' => ['title' => '特别关注客户(人)', 'num' => $gz_count, 'url' => '/pages/customer/filterList/index?istop=1&title=特别关注客户'],
|
||||
|
||||
Reference in New Issue
Block a user