|
|
@ -1,5 +1,6 @@
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
namespace Admin\Controller;
|
|
|
|
namespace Admin\Controller;
|
|
|
|
|
|
|
|
use Think\Exception;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 游戏流水聚合接口
|
|
|
|
* 游戏流水聚合接口
|
|
|
@ -36,12 +37,6 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
$this->GameSupersignModel = M("GameSupersign",'tab_');
|
|
|
|
$this->GameSupersignModel = M("GameSupersign",'tab_');
|
|
|
|
$this->CoinPayOrderModel = M("CoinPayOrder",'tab_');//会长充值平台币表
|
|
|
|
$this->CoinPayOrderModel = M("CoinPayOrder",'tab_');//会长充值平台币表
|
|
|
|
$this->TestOrderModel = M("TestOrder",'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->reCount();
|
|
|
|
$this->setFinancialSummary();
|
|
|
|
$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'];
|
|
|
|
$countRes = $this->FinancialSummaryModel->field("IFNULL(COUNT(*),0) count")->where("count_year = '{$this->year}' and count_month= '{$this->month}'")->find()['count'];
|
|
|
|
if($countRes > 0){
|
|
|
|
if($countRes > 0){
|
|
|
|
if($this->taskid){
|
|
|
|
|
|
|
|
throw new \Exception("error:Repeated statistics,msg:{$this->date}已经聚合过");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
die("error:Repeated statistics,msg:{$this->date}已经聚合过");
|
|
|
|
die("error:Repeated statistics,msg:{$this->date}已经聚合过");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "{$this->date}开始统计".PHP_EOL;
|
|
|
|
echo "{$this->date}开始统计".PHP_EOL;
|
|
|
|
echo "--收入类型统计中".PHP_EOL;
|
|
|
|
echo "--收入类型统计中".PHP_EOL;
|
|
|
|
$this->setIncomeMoney();
|
|
|
|
$this->setIncomeMoney();
|
|
|
|