优化结算同步

master
chenzhi 4 years ago
parent c21b9f619e
commit 1b7dae2603

@ -129,5 +129,6 @@ return array(
"tab_reward_detail",
"tab_reward_record",
"tab_new_company_statement_info",
"tab_spend"
]
);

@ -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]],

Loading…
Cancel
Save