管理后台-》推广员统计-》推广员注册统计列表数据权限与导出权限

管理后台-》推广员统计-》推广员充值统计列表数据权限与导出权限
master
liuweiwen 5 years ago
parent 47f53a4941
commit 0b2eb4a45b

@ -2492,7 +2492,8 @@ class ExportController extends Controller
} else {
$map['tp1.chain'] = '/';
}
//为数据权限添加
setPowerPromoteIds($map);
$data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count,
count(IF(register_time ' . $today . ',1,null)) as today,
count(IF(register_time ' . $week . ',1,null)) as week,
@ -2586,10 +2587,7 @@ class ExportController extends Controller
}
private function promotepay_statistics_export($p=0){
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$arraypage=$page;
$row = 10;
$map1['promote_id'] = $map['promote_id'] = array('egt', 0);
$spend=M('Spend','tab_');
if(isset($_REQUEST['timestart'])&&isset($_REQUEST['timeend'])){
@ -2627,9 +2625,12 @@ class ExportController extends Controller
if (isset($_REQUEST['promote_id'])) {
$promote_map = "`chain` = '%/{$_REQUEST['promote_id']}/%' OR id = {$_REQUEST['promote_id']}";
}
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->find()['acount'];
//为数据权限添加
setPowerPromoteIds($map);
$promote_map2 = array();
setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->where($promote_map)->where($promote_map2)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote);
$data =array();

@ -393,8 +393,13 @@ class PlatformController extends ThinkController
$map['tp1.chain'] = '/';
}
//为数据权限添加
setPowerPromoteIds($map);
$data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count,
$data = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
date_format(FROM_UNIXTIME(register_time),"% ") AS time,
count(u.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')
@ -458,7 +463,7 @@ class PlatformController extends ThinkController
$this->display();
}
//TODO:
function promotepay_statistics($p = 0)
public function promotepay_statistics($p = 0)
{
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
@ -497,9 +502,12 @@ class PlatformController extends ThinkController
if (isset($_REQUEST['promote_id'])) {
$promote_map = "`chain` = '%/{$_REQUEST['promote_id']}/%' OR id = {$_REQUEST['promote_id']}";
}
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->find()['acount'];
//为数据权限添加
setPowerPromoteIds($map);
$promote_map2 = array();
setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->where($promote_map2)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote);
$data =array();

Loading…
Cancel
Save