Merge branch 'feature/platfrom_aggregate_finance' of wmtx/platform into release

优化导出权限
master
廖金灵 5 years ago committed by Gogs
commit dbfad2d69c

@ -39,7 +39,7 @@ class CompanyGameRatioController extends AdminController
if(isset($params['company_id'])){
$where['m.company_id'] = $params['company_id'];
}
$this->checkListOrCountAuthRestMap($where);
// $this->checkListOrCountAuthRestMap($where);
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
$dbres = M("company_game_ratio","tab_")
@ -136,7 +136,7 @@ class CompanyGameRatioController extends AdminController
$where['m.status'] = $params['status'];
}
//TODO:未计算公司类型
$this->checkListOrCountAuthRestMap($where);
// $this->checkListOrCountAuthRestMap($where);
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
$dbres = M("company_game_ratio_log","tab_")
->alias('m')

@ -9,6 +9,39 @@ namespace Admin\Controller;
*/
class OldCountController extends \Think\Controller
{
/**
* 新的游戏比例后的数据迁移
* 重复执行将会叠加数据,请勿重复执行
*/
public function PromoteToCompanyRatioInit()
{
//获取旧数据
$oldres = M("promote_game_ratio","tab_")->field("promote_id,relation_game_id,ratio,turnover_ratio,begin_time,end_time")->group("promote_id,relation_game_id")->select();
$adddata = [];
$CompanyGameRatio = M("company_game_ratio","tab_");
foreach ($oldres as $k => &$v) {
$comoany_id = $this->promoteIdToCompanyId($v['promote_id']);
unset($v['promote_id']);
$v['company_id'] = $comoany_id ;
$adddata[$comoany_id] = $v;
}
foreach($adddata as $k => &$v){
$map = [
"company_id"=>$v['company_id'],
"relation_game_id"=>$v['relation_game_id']
];
$cres = $CompanyGameRatio->where($map)->find();
if(empty($cres)){
$CompanyGameRatio->add($v);
}
}
echo "PromoteToCompanyRatioInit success";
}
protected function promoteIdToCompanyId($promote_id)
{
return M("promote","tab_")->field("company_id")->where("id='{$promote_id}'")->find()['company_id'];
}
/**
* 财务分类汇总统计旧数据聚合
*/

@ -157,10 +157,8 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
</if>
{$_page|default=''}
</div>
<!--弹出层-->

@ -214,10 +214,8 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
</if>
{$_page|default=''}
</div>
<!--弹出层-->

@ -155,10 +155,8 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
</if>
{$_page|default=''}
</div>

@ -228,10 +228,8 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
</if>
{$_page|default=''}
</div>

Loading…
Cancel
Save