diff --git a/Application/Admin/Controller/SubCompanyStatementSetController.class.php b/Application/Admin/Controller/SubCompanyStatementSetController.class.php index af5e1671a..d160f6d34 100644 --- a/Application/Admin/Controller/SubCompanyStatementSetController.class.php +++ b/Application/Admin/Controller/SubCompanyStatementSetController.class.php @@ -24,16 +24,16 @@ class SubCompanyStatementSetController extends Controller { echo "请先设置请求接口aggregate_cp_settlement_api的值".PHP_EOL;die; } $this->cpapihost = $cpapihost['value']; - $this->synGame(); + // $this->synGame(); } //同步游戏表 - protected function synGame() - { - $mainGame = M("Game","tab_")->select(); - SM()->execute("truncate table tab_game"); - M("game","tab_",SUBSITE_DB)->addAll($mainGame); - } + // protected function synGame() + // { + // $mainGame = M("Game","tab_")->select(); + // SM()->execute("truncate table tab_game"); + // M("game","tab_",SUBSITE_DB)->addAll($mainGame); + // } /** * Undocumented function * @@ -258,7 +258,6 @@ class SubCompanyStatementSetController extends Controller { $statement_begin_time = date("Y.m.d",$begintime); $statement_end_time = date("Y.m.d",$endtime); $MainStatementDb = M("CompanyStatement","tab_"); //主站结算单 - // dd($cpList); foreach($cpList as $k=>$v){ // $sub_company_id = ($v['first_company_type'] == 1 ? $v['first_company_id'] : $v['second_company_id']); @@ -277,10 +276,13 @@ class SubCompanyStatementSetController extends Controller { if(isset($v['list'][$igm])){ $add_data['statement_info'][$index]['platform_money'] = $v['list'][$igm]['platform_money']; $add_data['statement_info'][$index]['aggregate_money'] = $v['list'][$igm]['aggregate_money']; - $add_data['statement_info'][$index]['ratio'] = $add_data['statement_info'][$index][$ratio_str]; + $game_pay_amount = $v['list'][$igm]['platform_money']-0+$v['list'][$igm]['aggregate_money']; + $ratio = getGameCpRadio($item['relation_game_id'], $game_pay_amount, true) - 0; + $add_data['statement_info'][$index]['ratio'] = $ratio; }else{ $add_data['statement_info'][$index]['platform_money'] = 0; $add_data['statement_info'][$index]['aggregate_money'] = 0; + $add_data['statement_info'][$index]['ratio'] = 0; } } unset($add_data['id'],$add_data['remark'],$add_data['confirm_status'],$add_data['confirm_log']); diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index 1668dc596..6faf72c8c 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -13,7 +13,7 @@ use Base\Service\GameService; class TestingResourceController extends ThinkController { - public function index() + public function roles() { $params = I('get.'); $gameId = $params['game_id'] ?? 0; @@ -458,6 +458,7 @@ class TestingResourceController extends ThinkController ->find(); if ($bindingRole) { $bindingRole['binding_time'] = $binding['create_time']; + $bindingRole['share_game_ids'] = $gameIds; } } @@ -467,7 +468,6 @@ class TestingResourceController extends ThinkController $hasItf = $gameSetting ? $gameSetting['has_itf'] : 0; } - $testingResourceService = new TestingResourceService(); $quota = $testingResourceService->getRemainQuota($role, $bindingRole); diff --git a/Application/Admin/View/TestingResource/apply.html b/Application/Admin/View/TestingResource/apply.html index a46acb912..557f12371 100644 --- a/Application/Admin/View/TestingResource/apply.html +++ b/Application/Admin/View/TestingResource/apply.html @@ -692,7 +692,7 @@ body { success: function(result){ if (result.status == 1) { layer.msg(result.message, function(){ - parent.window.location.href = "{:U('index')}" + parent.window.location.href = "{:U('roles')}" }) } else { layer.msg(result.message) diff --git a/Application/Admin/View/TestingResource/index.html b/Application/Admin/View/TestingResource/roles.html similarity index 99% rename from Application/Admin/View/TestingResource/index.html rename to Application/Admin/View/TestingResource/roles.html index 7ab71d248..eb3f96db2 100644 --- a/Application/Admin/View/TestingResource/index.html +++ b/Application/Admin/View/TestingResource/roles.html @@ -66,7 +66,7 @@