From 9b87b9c4a10f9b00eea6370e3524f6457b6ef2c2 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 25 Nov 2020 16:49:10 +0800 Subject: [PATCH] =?UTF-8?q?11=E6=9C=88=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyGameRatioController.class.php | 26 +++++++++---------- .../CompanyStatementSetController.class.php | 12 ++++----- .../Admin/View/CompanyGameRatio/addRatio.html | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index b34a95943..20db93a21 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -562,22 +562,22 @@ class CompanyGameRatioController extends AdminController } // dump($end_time);dump($begin_time);die(); $check_data = M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) ->find(); if ($check_data) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) ->save($ratiov); return; } M("company_game_ratio","tab_") // ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>['egt',$begin_time],'end_time'=>['elt',$end_time]]) - ->where("company_belong={$company_belong} and company_id={$company_id} and relation_game_id={$relation_game_id} and begin_time>={$begin_time} and end_time <= {$end_time} and end_time!=0") + ->where("company_id={$company_id} and relation_game_id={$relation_game_id} and begin_time>={$begin_time} and end_time <= {$end_time} and end_time!=0") ->delete(); $data = M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id]) ->order("begin_time DESC") ->select(); @@ -587,7 +587,7 @@ class CompanyGameRatioController extends AdminController if (!$end_time) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->delete(); continue; } @@ -598,18 +598,18 @@ class CompanyGameRatioController extends AdminController if ($end_time > $value['begin_time'] && ($end_time < $value['end_time']||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$end_time+1]); } else if ($end_time > $value['begin_time'] && ($end_time >= $value['end_time']&&$value['end_time']!=0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$begin_time,'end_time'=>$end_time]); } } else if ($value['begin_time'] <= $begin_time) { if (!$end_time&&($value['end_time']>$begin_time||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); continue; }else if (!$end_time) { @@ -621,11 +621,11 @@ class CompanyGameRatioController extends AdminController } if ($begin_time > $value['begin_time'] && ($end_time >= $value['end_time'] && $value['end_time']!=0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); } else if ($begin_time > $value['begin_time'] && ($end_time < $value['end_time']||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); $dataValue = $value; $dataValue['begin_time'] = $end_time+1; @@ -634,15 +634,15 @@ class CompanyGameRatioController extends AdminController } else if ($begin_time == $value['begin_time'] && ($end_time < $value['end_time']||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$end_time+1]); } else if ($end_time == $value['end_time']&&$begin_time>$value['begin_time']) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); } else if ($end_time == $value['end_time']&&$begin_time == $value['begin_time']) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$begin_time,'end_time'=>$end_time]); } diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 628b6db50..8ff15c6f5 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1328,9 +1328,9 @@ class CompanyStatementSetController extends Controller { $cpSpendList = $Spend->alias('s')->field('sum(s.pay_amount) pay_amount,s.game_id,g.relation_game_id,g.relation_game_name game_name')->where($cpMap)->group('game_id') ->join("left join tab_game g on s.game_id = g.id") ->select(); - if ($company_id == 43) { - dump($cpMap); - } +// if ($company_id == 43) { +// dump($cpMap); +// } foreach($cpSpendList as $ck=>$cv){ if(isset($cpgame[$cv['relation_game_id']])){ $cpgame[$cv['relation_game_id']]['pay_amount'] += $cv['pay_amount']; @@ -1398,9 +1398,9 @@ class CompanyStatementSetController extends Controller { $cpSpendList = $Spend->alias('s')->field('sum(s.pay_amount) pay_amount,s.game_id,g.relation_game_id,g.relation_game_name game_name')->where($cpMap)->group('game_id') ->join("left join tab_game g on s.game_id = g.id") ->select(); - if ($company_id == 43) { - dump($cpMap); - } +// if ($company_id == 43) { +// dump($cpMap); +// } foreach($cpSpendList as $ck=>$cv){ if(isset($cpgame[$cv['relation_game_id']])){ diff --git a/Application/Admin/View/CompanyGameRatio/addRatio.html b/Application/Admin/View/CompanyGameRatio/addRatio.html index aec8fa3ce..5dffbc456 100644 --- a/Application/Admin/View/CompanyGameRatio/addRatio.html +++ b/Application/Admin/View/CompanyGameRatio/addRatio.html @@ -102,7 +102,7 @@ - *推广公司类型: + 推广公司类型: