@ -245,7 +245,7 @@ class AjaxController extends ThinkController{
$withdraw_number = $_REQUEST['withdraw_number'];
$withdraw_number = $_REQUEST['withdraw_number'];
$data = M("withdraw","tab_")
$data = M("withdraw","tab_")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->where(['widthdraw_number'=>$withdraw_number])
->where(['widthdraw_number'=>$withdraw_number])
@ -312,9 +312,22 @@ class AjaxController extends ThinkController{
@ -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();