推广员统计官方渠道添加

master
zhengyongxing 5 years ago
parent 1ccf59fa26
commit 8e18e8faac

@ -387,6 +387,23 @@ class PlatformController extends ThinkController
->group('tp1.id')
->order('count desc, register_time')
->select();
//官方渠道数据添加
$authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count,
count(IF(register_time ' . $today . ',1,null)) as today,
count(IF(register_time ' . $week . ',1,null)) as week,
count(IF(register_time ' . $mounth . ',1,null)) as mounth')
->where(['promote_id'=>0])
->find();
$authorityData['promote_account'] = "官方渠道";
$authorityData['id'] = "1";
// $authorityData = [];
array_push($data, $authorityData);
//数据排序
$last_names = array_column($data,'count');
array_multisort($last_names,SORT_DESC,$data);
$count = count($data);
foreach ($data as $key => $value) {
static $i = 0;

Loading…
Cancel
Save