diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 59b9f567f..c648bbab0 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -220,7 +220,7 @@ class CompanyStatementSetController extends Controller { $dataurl .= $this->cpapihost."&".http_build_query($arr); $html = file_get_contents($dataurl); //防止并发压力 - sleep(5); + sleep(3); $rsp = json_decode($html,true); if($rsp['code'] != 1){ echo $rsp['error'].PHP_EOL;die; @@ -228,11 +228,11 @@ class CompanyStatementSetController extends Controller { $rsp = $rsp['data']; } //整合数据本地 - + foreach($locals as $k=>$v){ $cpList[$k]["list"] = $v["list"]; } - + //整合数据,聚合 foreach($rsp as $k=>$v){ if(isset($cpList[$k]["list"])){ @@ -241,7 +241,7 @@ class CompanyStatementSetController extends Controller { if(isset($cpList[$k]["list"][$ke])){ $cpList[$k]["list"][$ke]['pay_money'] += $va['pay_money']; }else{ - $cpList[$k]["list"][$ke] = ["pay_money"=>$va['pay_money']]; + $cpList[$k]["list"][$ke] = $va; } } }else{ @@ -304,9 +304,12 @@ class CompanyStatementSetController extends Controller { $game['game_name'] =$ke; //获取游戏id及比例 $game_id = $GameDb->where("relation_game_name='{$ke}' OR original_package_name='{$ke}'")->field("id,relation_game_id")->find(); + if(empty($game_id) && isset($va['unique_code']) && !empty($va['unique_code'])){ + $unique_code = $va['unique_code']; + $game_id = $GameDb->where("unique_code='{$unique_code }'")->field("id,relation_game_id")->find(); + } if(empty($game_id)){ $game['relation_game_id']=0; - // $game['sum_money']=0; $tratio = 0; }else{ //获取比例 @@ -401,7 +404,6 @@ class CompanyStatementSetController extends Controller { $add_data['pay_amount'] -= $server_count;; } } - $add_data['statement_info'] = json_encode($add_data['statement_info'],JSON_UNESCAPED_UNICODE); if($type == 2 && $add_data['statement_money'] == 0){ //金额为0不补点