|
|
|
@ -59,6 +59,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
}else{
|
|
|
|
|
$companyres = $companyres->page($page,$row)->select();
|
|
|
|
|
}
|
|
|
|
|
if(1 == 0){
|
|
|
|
|
//获取公司id
|
|
|
|
|
$companyids = implode(',', array_column($companyres, 'id'));
|
|
|
|
|
//获取所属会长及其游戏分成
|
|
|
|
@ -139,39 +140,41 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$promoterestemp[$v['company_id']]["list"][]=$v;
|
|
|
|
|
}
|
|
|
|
|
unset($promoteres);
|
|
|
|
|
//处理公司数据
|
|
|
|
|
foreach($companyres as $k=>&$v){
|
|
|
|
|
if(array_key_exists($v['id'],$promoterestemp)){
|
|
|
|
|
//存在
|
|
|
|
|
$v['list'] = $promoterestemp[$v['id']]['list'];
|
|
|
|
|
foreach($promoterestemp[$v['id']] as $ke=>$va){
|
|
|
|
|
foreach($va as $key=>$val){
|
|
|
|
|
$v['row'] += $val['row'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
$v['can_del'] = 0;
|
|
|
|
|
}else{
|
|
|
|
|
//空值
|
|
|
|
|
$v['can_del'] = 1;
|
|
|
|
|
$v['list']=[
|
|
|
|
|
[
|
|
|
|
|
"account"=>"--",
|
|
|
|
|
"settlement_type"=>"--",
|
|
|
|
|
'list'=>[
|
|
|
|
|
[
|
|
|
|
|
"relation_game_name"=>"--",
|
|
|
|
|
"game_type_name"=>"--",
|
|
|
|
|
"turnover_ratio"=>[
|
|
|
|
|
["name"=>"--","ratio"=>"--"]
|
|
|
|
|
],
|
|
|
|
|
"row"=>1
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
$v['row'] += 1;
|
|
|
|
|
}
|
|
|
|
|
//处理公司数据
|
|
|
|
|
foreach($companyres as $k=>&$v){
|
|
|
|
|
// if(array_key_exists($v['id'],$promoterestemp)){
|
|
|
|
|
// //存在
|
|
|
|
|
// $v['list'] = $promoterestemp[$v['id']]['list'];
|
|
|
|
|
// foreach($promoterestemp[$v['id']] as $ke=>$va){
|
|
|
|
|
// foreach($va as $key=>$val){
|
|
|
|
|
// $v['row'] += $val['row'];
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// $v['can_del'] = 0;
|
|
|
|
|
// }else{
|
|
|
|
|
// //空值
|
|
|
|
|
// $v['can_del'] = 1;
|
|
|
|
|
// $v['list']=[
|
|
|
|
|
// [
|
|
|
|
|
// "account"=>"--",
|
|
|
|
|
// "settlement_type"=>"--",
|
|
|
|
|
// 'list'=>[
|
|
|
|
|
// [
|
|
|
|
|
// "relation_game_name"=>"--",
|
|
|
|
|
// "game_type_name"=>"--",
|
|
|
|
|
// "turnover_ratio"=>[
|
|
|
|
|
// ["name"=>"--","ratio"=>"--"]
|
|
|
|
|
// ],
|
|
|
|
|
// "row"=>1
|
|
|
|
|
// ]
|
|
|
|
|
// ]
|
|
|
|
|
// ]
|
|
|
|
|
// ];
|
|
|
|
|
// $v['row'] += 1;
|
|
|
|
|
// }
|
|
|
|
|
if( $v["contact_begin"] >0 ){
|
|
|
|
|
$v["contact_begin"] = date('Y/m/d', $v["contact_begin"]);
|
|
|
|
|
}else{
|
|
|
|
@ -190,6 +193,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$v["company_type"] = ($v["company_type"]=="1" ? "公司" :'个人');
|
|
|
|
|
$v["company_belong"] = ($v["company_belong"]=="0" ? "内团" : ($v["company_belong"]=="1" ? "外团" : ($v["company_belong"]=="2" ? "外团分发" : '无')));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dd($companyres);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|