diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index 26d141df6..e3319f786 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -129,5 +129,6 @@ return array( "tab_reward_detail", "tab_reward_record", "tab_new_company_statement_info", + "tab_spend" ] ); \ No newline at end of file diff --git a/Application/Admin/Controller/SubCompanyStatementSetController.class.php b/Application/Admin/Controller/SubCompanyStatementSetController.class.php index 6a80f8639..af5e1671a 100644 --- a/Application/Admin/Controller/SubCompanyStatementSetController.class.php +++ b/Application/Admin/Controller/SubCompanyStatementSetController.class.php @@ -24,6 +24,15 @@ class SubCompanyStatementSetController extends Controller { echo "请先设置请求接口aggregate_cp_settlement_api的值".PHP_EOL;die; } $this->cpapihost = $cpapihost['value']; + $this->synGame(); + } + + //同步游戏表 + protected function synGame() + { + $mainGame = M("Game","tab_")->select(); + SM()->execute("truncate table tab_game"); + M("game","tab_",SUBSITE_DB)->addAll($mainGame); } /** * Undocumented function @@ -398,7 +407,7 @@ class SubCompanyStatementSetController extends Controller { $Promote = M("Promote","tab_"); - $Spend = M("Spend","tab_"); + $Spend = SM("Spend","tab_"); $spenMap = [ "s.pay_status"=>1, "s.payed_time"=>['between', [$begintime,$endtime]], @@ -616,7 +625,7 @@ class SubCompanyStatementSetController extends Controller { //获取推广员 if(count($idarr) == 0){return $res;} $Promote = M("Promote","tab_"); - $Spend = M("Spend","tab_"); + $Spend = SM("Spend","tab_"); $spenMap = [ "s.pay_status"=>1, "s.payed_time"=>['between', [$begintime,$endtime]], @@ -996,7 +1005,7 @@ class SubCompanyStatementSetController extends Controller { $res = []; //获取推广员 $Promote = M("Promote","tab_"); - $Spend = M("Spend","tab_"); + $Spend = SM("Spend","tab_"); $spenMap = [ "s.pay_status"=>1, "s.payed_time"=>['between', [$begintime,$endtime]], @@ -1023,7 +1032,7 @@ class SubCompanyStatementSetController extends Controller { $res = []; //获取推广员 $Promote = M("Promote","tab_"); - $Spend = M("Spend","tab_"); + $Spend = SM("Spend","tab_"); $spenMap = [ "s.pay_status"=>1, "s.payed_time"=>['between', [$begintime,$endtime]],