市场结算官方渠道检索修正

master
zhengyongxing 5 years ago
parent a968c5dbe4
commit 3c9a828537

@ -1015,8 +1015,9 @@ class QueryController extends ThinkController
} }
$map = []; $map = [];
setPowerPromoteIds($map,'root_id');
if ($_REQUEST['promote_id']) { if ($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') {
$map['root_id'] = $_REQUEST['promote_id']; $map['root_id'] = $_REQUEST['promote_id'];
} }
@ -1041,7 +1042,6 @@ class QueryController extends ThinkController
->order("my_time Desc") ->order("my_time Desc")
->select(false); ->select(false);
setPowerPromoteIds($map,'root_id');
$count = M()->table('('.$data.') as a') $count = M()->table('('.$data.') as a')
->field("my_time,pay_amount,game_id,game_names,promote_id,promote_account,a.company_relation,a.company_belong,CASE WHEN root_id is null THEN 0 ELSE root_id END as root_id,CASE WHEN account is null THEN '官方渠道' ELSE account END as account") ->field("my_time,pay_amount,game_id,game_names,promote_id,promote_account,a.company_relation,a.company_belong,CASE WHEN root_id is null THEN 0 ELSE root_id END as root_id,CASE WHEN account is null THEN '官方渠道' ELSE account END as account")
@ -1062,6 +1062,8 @@ class QueryController extends ThinkController
->group("my_time,game_names,root_id") ->group("my_time,game_names,root_id")
->order("my_time Desc") ->order("my_time Desc")
->select(); ->select();
// var_dump($data);die();
// dump($data);die(); // dump($data);die();
$pagecount = M()->table('('.$count.') as a')->count(); $pagecount = M()->table('('.$count.') as a')->count();

Loading…
Cancel
Save