跟进维护

This commit is contained in:
“wanyongkang”
2023-08-10 17:34:39 +08:00
parent b8ec386b02
commit dcf0a909f6
4 changed files with 142 additions and 18 deletions

View File

@@ -4,8 +4,8 @@
* @version:
* @Author: kangkang
* @Date: 2020-10-13 19:52:37
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-01-15 10:01:55
* @LastEditors: “wanyongkang” “937888580@qq.com”
* @LastEditTime: 2023-08-10 16:41:56
*/
namespace app\manager\controller;
@@ -61,6 +61,11 @@ class UserFollow extends Controller
if (!$manager_info['IsRoot']) {
$where['ManagerId'] = $this->userinfo['OperaterID'];
$sort_where['ManagerId'] = $this->userinfo['OperaterID'];
} else {
if (!empty($_GET['search']['manager_id'])) {
$where['ManagerId'] = $_GET['search']['manager_id'];
$sort_where['ManagerId'] = $_GET['search']['manager_id'];
}
}
if (isset($_GET['PageIndex'])) {
@@ -90,11 +95,13 @@ class UserFollow extends Controller
$date4 = date('Y-m-d H:i:s', strtotime($search['new_month']['e_time']));
}
//两个时间是单独分开的 不一定是连续两个月
//上月
$time_where1 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
//本月
$time_where2 .= " UpdateTime>='" . $date3 . "' and UpdateTime<='" . $date4 . "' ";
//消费金额
if (!empty($search['money2'])) {
$is_screen = true;
switch ($search['cost_type']) {
@@ -159,14 +166,24 @@ class UserFollow extends Controller
$limit = "$page,50";
}
$user_list = $user_model->getListPage($where, 'Id,follow_status,LoginCode,CreateTime,Wx,QQ,pay_time', 'id desc', $limit);
$user_list = $user_model->getListPage($where, 'Id,follow_status,LoginCode,CreateTime,Wx,QQ,pay_time,is_verify,ProductAccountCount,ManagerName', 'id desc', $limit);
$list = [];
$user_id_list = [];
//获取用户列表
foreach ($user_list as $info) {
$isverify = ['未实名','已实名','被禁用'];
$verify_status = $isverify[$info['is_verify']];
if ($info['is_verify'] == 1) {
$istest = ['未测试','已测试'];
$verify_status = $istest[$info['ProductAccountCount']];
}
$info['ManagerName'] = $info['ManagerName'];
$info['last_pay_time'] = $info['pay_time'];
$info['follow_status'] = $user_enum::$FollowStatus[$info['follow_status']];
$info['is_verify'] = $verify_status;
$info['follow_status'] = $user_enum::$FollowStatus[$info['follow_status']]??$user_enum::$FollowStatus[1];
$info['UserName'] = mb_substr($info['LoginCode'], 0, 3) . '***' . mb_substr($info['LoginCode'], -3);
$info['all_amount'] = 0;
$info['PrevMonthAmount'] = 0;