|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
<?php
|
|
|
|
|
namespace Admin\Controller;
|
|
|
|
|
use Think\Exception;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 游戏流水聚合接口
|
|
|
|
@ -36,12 +37,6 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
$this->GameSupersignModel = M("GameSupersign",'tab_');
|
|
|
|
|
$this->CoinPayOrderModel = M("CoinPayOrder",'tab_');//会长充值平台币表
|
|
|
|
|
$this->TestOrderModel = M("TestOrder",'tab_');//测试订单录入
|
|
|
|
|
|
|
|
|
|
$taskid = I("taskid");
|
|
|
|
|
if(!empty($taskid)){
|
|
|
|
|
$this->taskid = $taskid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 更新某月数据
|
|
|
|
@ -63,9 +58,6 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
|
|
|
|
|
$this->reCount();
|
|
|
|
|
$this->setFinancialSummary();
|
|
|
|
|
if($this->taskid){
|
|
|
|
|
D("CmdTasks")->updateTask(['id'=>$this->taskid,'status'=>2,'end_time' => time(), 'result' =>$this->result]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 强制重新聚合
|
|
|
|
@ -95,12 +87,8 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
//判断是否已经聚合
|
|
|
|
|
$countRes = $this->FinancialSummaryModel->field("IFNULL(COUNT(*),0) count")->where("count_year = '{$this->year}' and count_month= '{$this->month}'")->find()['count'];
|
|
|
|
|
if($countRes > 0){
|
|
|
|
|
if($this->taskid){
|
|
|
|
|
throw new \Exception("error:Repeated statistics,msg:{$this->date}已经聚合过");
|
|
|
|
|
}else{
|
|
|
|
|
die("error:Repeated statistics,msg:{$this->date}已经聚合过");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo "{$this->date}开始统计".PHP_EOL;
|
|
|
|
|
echo "--收入类型统计中".PHP_EOL;
|
|
|
|
|
$this->setIncomeMoney();
|
|
|
|
|