|
|
|
@ -207,21 +207,8 @@ class StatementWarningSetController extends Controller {
|
|
|
|
|
$company = $this->getCpCompanyInfo(array_keys($gamedata));
|
|
|
|
|
$cpStatementAmount = $this->addCpStatementWarningInfo($company,$gamedata);
|
|
|
|
|
}
|
|
|
|
|
$savedata = [
|
|
|
|
|
'type'=>2,
|
|
|
|
|
'name'=>'up_statement',
|
|
|
|
|
'count_month'=>$this->month,
|
|
|
|
|
'count_year'=>$this->year
|
|
|
|
|
];
|
|
|
|
|
$hasDb = $this->statementWarningModel->where($savedata)->find();
|
|
|
|
|
$savedata = array_merge(['money'=>$cpStatementAmount,'create_time'=>time()],$savedata);
|
|
|
|
|
if($hasDb){
|
|
|
|
|
$savedata['id'] = $hasDb['id'];
|
|
|
|
|
$this->statementWarningModel->save($savedata);
|
|
|
|
|
}else{
|
|
|
|
|
$this->statementWarningModel->add($savedata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->addStatementWarning(2,'up_statement',$cpStatementAmount);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取月份游戏结算额
|
|
|
|
@ -292,20 +279,8 @@ class StatementWarningSetController extends Controller {
|
|
|
|
|
|
|
|
|
|
$company = $this->getPromoteCompanyGameSpend($company,0);
|
|
|
|
|
$pcStatementAmount = $this->addStatementWarningInfo($company,0);
|
|
|
|
|
$savedata = [
|
|
|
|
|
'type'=>2,
|
|
|
|
|
'name'=>'pc_statement',
|
|
|
|
|
'count_month'=>$this->month,
|
|
|
|
|
'count_year'=>$this->year
|
|
|
|
|
];
|
|
|
|
|
$hasDb = $this->statementWarningModel->where($savedata)->find();
|
|
|
|
|
$savedata = array_merge(['money'=>$pcStatementAmount,'create_time'=>time()],$savedata);
|
|
|
|
|
if($hasDb){
|
|
|
|
|
$savedata['id'] = $hasDb['id'];
|
|
|
|
|
$this->statementWarningModel->save($savedata);
|
|
|
|
|
}else{
|
|
|
|
|
$this->statementWarningModel->add($savedata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->addStatementWarning(2,'pc_statement',$pcStatementAmount);
|
|
|
|
|
}
|
|
|
|
|
private function getPromoteCompanyGameSpend($company,$companyBelong)
|
|
|
|
|
{
|
|
|
|
|