From 6e405febc194cb6d3cdf8dfe96cd61289b1938a6 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Fri, 10 Jan 2020 11:51:47 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=88=86=E6=88=90?= =?UTF-8?q?=E6=AF=94=E4=BE=8B=E5=AE=89=E5=8D=93IOS=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/GameController.class.php | 56 ++++++++++++++++--- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 6531fbd53..c7fbef940 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -774,9 +774,10 @@ class GameController extends ThinkController if(!is_numeric($data['game_ratio']) || $data['game_ratio']<0 || $data['game_ratio']>100){ die(json_encode(array("result"=>"0","desc"=>"分成比例为0~100之间"))); } + $game_info = M("game","tab_")->where("id=".$data['game_id'])->field("relation_game_id")->find();//根据游戏找到关联的游戏ID + $relation_game_list = M("game","tab_")->where("relation_game_id=".$game_info['relation_game_id'])->select();//根据关联ID找到游戏列表 if($data['data_type']=='initial'){ //CP初始分成比例 - if($data['data_id']>0){ //修改初始CP分成比例 $where = array(); $where['is_del'] = "0"; @@ -790,12 +791,27 @@ class GameController extends ThinkController if($info){ die(json_encode(array("result"=>"0","desc"=>"CP分成比例应小于".$info['ratio']."%"))); } - M('cp_game_ratio', 'tab_')->where("id=%d",$data['data_id'])->data(array("ratio"=>$data['game_ratio'],"update_time"=>time()))->save(); + + foreach ($relation_game_list as $game){ + $map['game_id'] = $game['id']; + $map['is_del'] = 0; + $map['begin_total_amount'] = 0; + M('cp_game_ratio', 'tab_')->where($map)->data(array("ratio"=>$data['game_ratio'],"update_time"=>time()))->save(); + } + //M('cp_game_ratio', 'tab_')->where("id=%d",$data['data_id'])->data(array("ratio"=>$data['game_ratio'],"update_time"=>time()))->save(); }else{ if($initial_info){ - M('cp_game_ratio', 'tab_')->where("id=%d",$initial_info['id'])->data(array("ratio"=>$data['game_ratio'],"update_time"=>time()))->save(); + foreach ($relation_game_list as $game){ + $map['game_id'] = $game['id']; + $map['is_del'] = 0; + $map['begin_total_amount'] = 0; + M('cp_game_ratio', 'tab_')->where($map)->data(array("ratio"=>$data['game_ratio'],"update_time"=>time()))->save(); + } + //M('cp_game_ratio', 'tab_')->where("id=%d",$initial_info['id'])->data(array("ratio"=>$data['game_ratio'],"update_time"=>time()))->save(); }else{ - M('cp_game_ratio', 'tab_')->data(array("game_id"=>$data['game_id'],"ratio"=>$data['game_ratio'],"begin_total_amount"=>0,"add_time"=>time(),"update_time"=>time()))->add(); + foreach ($relation_game_list as $game) { + M('cp_game_ratio', 'tab_')->data(array("game_id" => $game['id'], "ratio" => $data['game_ratio'], "begin_total_amount" => 0, "add_time" => time(), "update_time" => time()))->add(); + } } } }else{ //CP阶梯分成档位 @@ -820,7 +836,17 @@ class GameController extends ThinkController die(json_encode(array("result"=>"0","desc"=>"分成比例不得小于初始比例"))); } - M('cp_game_ratio', 'tab_')->where("id=%d",$data['data_id'])->data(array("ratio"=>$data['game_ratio'],"begin_total_amount"=>$data['total_amount'],"update_time"=>time()))->save(); + $info = M('cp_game_ratio', 'tab_')->where("id=%d",$data['data_id'])->find(); + foreach ($relation_game_list as $game) { + $map['ratio'] = $info['ratio']; + $map['begin_total_amount'] = $info['begin_total_amount']; + $map['is_del'] = 0; + $map['game_id']= $game['id']; + $updainfo = M('cp_game_ratio', 'tab_')->where($map)->find(); + if($updainfo){ + M('cp_game_ratio', 'tab_')->where("id=%d",$updainfo['id'])->data(array("ratio"=>$data['game_ratio'],"begin_total_amount"=>$data['total_amount'],"update_time"=>time()))->save(); + } + } }else{ if(!$initial_info){ die(json_encode(array("result"=>"0","desc"=>"请先设置初始CP分成比例"))); @@ -833,7 +859,9 @@ class GameController extends ThinkController if($max_info['max_ratio'] >= $data['game_ratio'] || $max_info['max_amount']>=$data['total_amount']){ die(json_encode(array("result"=>"0","desc"=>"新增分成档位金额或分成比例需大于现有分成档位"))); } - M('cp_game_ratio', 'tab_')->data(array("game_id"=>$data['game_id'],"ratio"=>$data['game_ratio'],"begin_total_amount"=>$data['total_amount'],"add_time"=>time(),"update_time"=>time()))->add(); + foreach ($relation_game_list as $game) { + M('cp_game_ratio', 'tab_')->data(array("game_id"=>$game['id'],"ratio"=>$data['game_ratio'],"begin_total_amount"=>$data['total_amount'],"add_time"=>time(),"update_time"=>time()))->add(); + } } } } @@ -844,7 +872,21 @@ class GameController extends ThinkController * 删除CP分成比例 */ public function delete_ratio(){ - M('cp_game_ratio', 'tab_')->where("id=".$_POST['data_id'])->data(array("is_del"=>"1","update_time"=>time()))->save(); + $info = M('cp_game_ratio', 'tab_')->where("id=%d",$_POST['data_id'])->find(); + $game_info = M("game","tab_")->where("id=".$info['game_id'])->field("relation_game_id")->find();//根据游戏找到关联的游戏ID + $relation_game_list = M("game","tab_")->where("relation_game_id=".$game_info['relation_game_id'])->select();//根据关联ID找到游戏列表 + + foreach ($relation_game_list as $game) { + $map['ratio'] = $info['ratio']; + $map['begin_total_amount'] = $info['begin_total_amount']; + $map['is_del'] = 0; + $map['game_id']= $game['id']; + $updainfo = M('cp_game_ratio', 'tab_')->where($map)->find(); + if($updainfo){ + M('cp_game_ratio', 'tab_')->where("id=".$updainfo['id'])->data(array("is_del"=>"1","update_time"=>time()))->save(); + } + } + //M('cp_game_ratio', 'tab_')->where("id=".$_POST['data_id'])->data(array("is_del"=>"1","update_time"=>time()))->save(); echo(json_encode(array("result"=>"1","desc"=>"删除成功"))); } } From 49e0e19cc8de08ba4e7892426a05a2a116a4a5f8 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Fri, 10 Jan 2020 11:53:34 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E4=B8=8E?= =?UTF-8?q?=E5=90=88=E4=BD=9C=E5=85=AC=E5=8F=B8=E5=8F=AA=E8=83=BD=E7=9C=8B?= =?UTF-8?q?=E5=88=B0=E8=87=AA=E5=B7=B1=E7=9A=84=E5=85=AC=E5=8F=B8=E7=9A=84?= =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PublicController.class.php | 2 ++ Application/Admin/Controller/VerifyBillController.class.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PublicController.class.php b/Application/Admin/Controller/PublicController.class.php index 2afd43a19..c0d0aeb36 100644 --- a/Application/Admin/Controller/PublicController.class.php +++ b/Application/Admin/Controller/PublicController.class.php @@ -92,6 +92,7 @@ class PublicController extends \Think\Controller 'mobile_phone' => $promote['mobile_phone'], 'nickname' => $promote['nickname'], 'username' => $promote['nickname'] ?: $promote['account'], + 'company_id' => $promote['company_id'], ); $session_name = 'cp_user_auth'; if (I('auto_login')) { @@ -111,6 +112,7 @@ class PublicController extends \Think\Controller 'account' => $partner['link_phone'], 'mobile_phone' => $partner['link_phone'], 'nickname' => $partner['link_man'], + 'company_id' => $partner['id'], 'username' => $partner['link_man'] ?: $partner['account'], ); $session_name = 'cp_user_auth'; diff --git a/Application/Admin/Controller/VerifyBillController.class.php b/Application/Admin/Controller/VerifyBillController.class.php index 9408dc618..1c2344f53 100644 --- a/Application/Admin/Controller/VerifyBillController.class.php +++ b/Application/Admin/Controller/VerifyBillController.class.php @@ -32,7 +32,10 @@ class VerifyBillController extends Controller { */ public function index(){ $m_title = '对账单管理'; - $list_data = DM('statement')->order('create_time desc')->select(); + $list_data = DM('statement') + ->where(['company_id' => session('cp_user_auth.company_id')]) + ->order('create_time desc') + ->select(); foreach ($list_data as $key => $value) { $list_data[$key]['statement_type_str'] = $value['statement_type'] ? '工会对账单' : 'cp对账单'; } From 51844a824e69939aed19b62e1d2358255e18c572 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Fri, 10 Jan 2020 14:00:16 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E5=B7=A5=E4=BC=9A=E5=BD=92=E5=B1=9E?= =?UTF-8?q?=E4=BC=9A=E9=95=BF=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PromoteController.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 6c5f1fa1c..268a0b1ab 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -1225,6 +1225,9 @@ class PromoteController extends ThinkController public function belong_add($promote_id=null, $company_belong = null, $company_relation = null, $remark = null) { if (IS_POST) { + if (empty($promote_id)) { + $this->error('请选择会长'); + } $data = array( 'promote_id' => $promote_id, 'company_belong' => $company_belong, @@ -1258,6 +1261,9 @@ class PromoteController extends ThinkController public function belong_edit($promote_id=null, $company_belong = null, $company_relation = null, $remark = null) { if (IS_POST) { + if (empty($promote_id)) { + $this->error('请选择会长'); + } $data = array( 'promote_id' => $promote_id, 'company_belong' => $company_belong, From a7e9f62367d71ade9150704bdb73b643b2b45b5f Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Fri, 10 Jan 2020 14:13:27 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PublicController.class.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/PublicController.class.php b/Application/Admin/Controller/PublicController.class.php index c0d0aeb36..673cc9b5a 100644 --- a/Application/Admin/Controller/PublicController.class.php +++ b/Application/Admin/Controller/PublicController.class.php @@ -83,7 +83,6 @@ class PublicController extends \Think\Controller 'mobile_phone' => $mobile, 'level' => 1, ])->find(); - if ($promote) { /* 记录登录SESSION和COOKIES */ $cp_auth = array( @@ -96,8 +95,12 @@ class PublicController extends \Think\Controller ); $session_name = 'cp_user_auth'; if (I('auto_login')) { - session(['name' => $session_name, 'expire' => 60*60*24*30], $cp_auth); - session(['name' => $session_name.'_sign', 'expire' => 60*60*24*30], data_auth_sign($cp_auth)); + $expireTime = 60*60*24*30;//自动登录一个月 + ini_set('session.gc_maxlifetime', $expireTime); + ini_set('session.cookie_lifetime', $expireTime); + session($session_name, $cp_auth); + session($session_name.'_sign', data_auth_sign($cp_auth)); + session($session_name.'_expire', time()); } else { session($session_name, $cp_auth); session($session_name.'_sign', data_auth_sign($cp_auth)); @@ -117,8 +120,12 @@ class PublicController extends \Think\Controller ); $session_name = 'cp_user_auth'; if (I('auto_login')) { - session(['name' => $session_name, 'expire' => 60*60*24*30], $cp_auth); - session(['name' => $session_name.'_sign', 'expire' => 60*60*24*30], data_auth_sign($cp_auth)); + $expireTime = 60*60*24*30;//自动登录一个月 + ini_set('session.gc_maxlifetime', $expireTime); + ini_set('session.cookie_lifetime', $expireTime); + session($session_name, $cp_auth); + session($session_name.'_sign', data_auth_sign($cp_auth)); + session($session_name.'_expire', time()); } else { session($session_name, $cp_auth); session($session_name.'_sign', data_auth_sign($cp_auth)); From 7f99dafb2c9a74d26722105713a715eb64ce9fb7 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 10 Jan 2020 14:46:48 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E4=B8=8A=E6=B8=B8=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E6=B5=81=E6=B0=B4bug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 11 ++++++++ .../Controller/QueryController.class.php | 25 ++++++++++++------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 5daf3fc13..4c38f8749 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2009,6 +2009,17 @@ function getWithdrawNumber() { return $data; } +//上有流水计算 +function caculateUpstream($game_id,$pay_amount) { + + $data = M('cp_game_ratio','tab_') + ->where(['game_id'=>$game_id,'begin_total_amount'=>['elt',$pay_amount],'is_del'=>0]) + ->order('begin_total_amount Desc') + ->find(); + + return number_format($pay_amount*($data['ratio']/100),2,'.',''); + +} ?> diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index a3c0ff00f..1779e918b 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -1015,10 +1015,15 @@ class QueryController extends ThinkController } $map = []; - setPowerPromoteIds($map,'root_id'); +// setPowerPromoteIds($map,'root_id'); if ($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') { - $map['root_id'] = $_REQUEST['promote_id']; + if ($_REQUEST['promote_id']=='0') { + unset($map['root_id']); + $map['promote_account'] = '官方渠道'; + } else { + $map['root_id'] = $_REQUEST['promote_id']; + } } if ($_REQUEST['game_name']) { @@ -1053,10 +1058,10 @@ class QueryController extends ThinkController //关联表获取会长账号名 $data = M()->table('('.$data.') as a') - ->field("my_time,pay_amount,a.game_id,game_name,game_names,a.promote_id,a.promote_account,a.company_relation,a.company_belong,CASE WHEN root_id is null THEN 0 ELSE root_id END as root_id,CASE WHEN account is null THEN '官方渠道' ELSE account END as account,tab_ratio.ratio as ratio,turnover_ratio,game_ratio.ratio as games_ratio") + ->field("my_time,pay_amount,a.game_id,game_name,game_names,a.promote_id,a.promote_account,a.company_relation,a.company_belong,CASE WHEN root_id is null THEN 0 ELSE root_id END as root_id,CASE WHEN account is null THEN '官方渠道' ELSE account END as account,tab_ratio.ratio as ratio,turnover_ratio") ->join("left join tab_promote on root_id = tab_promote.id") ->join("left join tab_promote_game_ratio as tab_ratio on tab_ratio.game_id = a.game_id and tab_ratio.promote_id=root_id") - ->join("left join tab_cp_game_ratio as game_ratio on game_ratio.game_id = a.game_id") +// ->join("left join tab_cp_game_ratio as game_ratio on game_ratio.game_id = a.game_id") ->page($page,$row) ->where($map) ->group("my_time,game_names,root_id") @@ -1071,11 +1076,11 @@ class QueryController extends ThinkController foreach($data as $key => $value) { - if ($value['games_ratio']) { - $data[$key]['upstream'] = $value['pay_amount'] * ($value['games_ratio']*0.01); - } else { - $data[$key]['upstream'] = $value['pay_amount'] * 0; - } +// if ($value['games_ratio']) { +// $data[$key]['upstream'] = $value['pay_amount'] * ($value['games_ratio']*0.01); +// } else { + $data[$key]['upstream'] = caculateUpstream($value['game_id'],$value['pay_amount']); +// } if ($value['ratio']) { $data[$key]['downstream'] = $value['pay_amount'] * ($value['ratio']*0.01); @@ -1086,6 +1091,8 @@ class QueryController extends ThinkController $value['turnover_ratio'] = json_decode($value['turnover_ratio'],true); +// dd($value); + if (is_array($value['turnover_ratio'])) { foreach($value['turnover_ratio'] as $k =>$v) { if($value['pay_amount']>$v['turnover']) { From e4b07360ad7bf1fc785a573bb2b665de17e09f9f Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Fri, 10 Jan 2020 14:52:45 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E6=9B=B4=E6=96=B0SQL=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index 224860407..9993fb58b 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -976,3 +976,19 @@ CREATE TABLE `tab_statement` ( +-- 新增CP游戏分成比例表 2020-01-09 郑昌隆 +CREATE TABLE `tab_cp_game_ratio` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `game_id` int(11) DEFAULT '0' COMMENT '游戏ID', + `ratio` decimal(5,2) DEFAULT '0.00' COMMENT '分成比率', + `begin_total_amount` decimal(11,2) DEFAULT '0.00' COMMENT '分成开始档位总流水', + `add_time` int(11) DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) DEFAULT '0' COMMENT '更新时间', + `is_del` tinyint(2) DEFAULT '0' COMMENT '1-已删除', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 玩家列表账户锁定添加备注 2020-01-09 郑昌隆 +ALTER TABLE `tab_user` ADD COLUMN `lock_remark` varchar(512) NOT NULL DEFAULT '' COMMENT '账号锁定原因' after lock_status; + + From ed706c1b86ad8046e48a89d04415752f3b63dc2c Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Fri, 10 Jan 2020 15:55:14 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Tool/company_info.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Application/Admin/View/Tool/company_info.html b/Application/Admin/View/Tool/company_info.html index c2469c7ef..db94149f4 100644 --- a/Application/Admin/View/Tool/company_info.html +++ b/Application/Admin/View/Tool/company_info.html @@ -26,21 +26,21 @@ 公司名称 - + 联系人 - + 联系电话 - + @@ -48,7 +48,7 @@ 邮寄地址 - + @@ -56,7 +56,7 @@ 公司税号 - + @@ -64,7 +64,7 @@ 收款方名称 - + @@ -72,7 +72,7 @@ 银行账号 - + @@ -80,7 +80,7 @@ 开户行 - + From 41421a9b10a96c84dd94208411847a894855f203 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 10 Jan 2020 16:14:09 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Statement/createCpStatement.html | 3 +-- Application/Admin/View/Statement/editCpStatement.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Application/Admin/View/Statement/createCpStatement.html b/Application/Admin/View/Statement/createCpStatement.html index 5d6634367..ba5d11532 100644 --- a/Application/Admin/View/Statement/createCpStatement.html +++ b/Application/Admin/View/Statement/createCpStatement.html @@ -24,10 +24,9 @@ min-width:100%; } body { - padding: 0px; + padding: 0px 0px 150px; width: 960px; margin: auto; - } .tabcon1711 table{ width: 480px; diff --git a/Application/Admin/View/Statement/editCpStatement.html b/Application/Admin/View/Statement/editCpStatement.html index cebc94243..353eab061 100644 --- a/Application/Admin/View/Statement/editCpStatement.html +++ b/Application/Admin/View/Statement/editCpStatement.html @@ -27,7 +27,7 @@ } body { - padding: 0px; + padding: 0px 0px 150px; width: 960px; margin: auto; From 0f8da4afac169aeeb8eca6d69a6ed4cc9d1f0721 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 10 Jan 2020 16:16:43 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Statement/createCpStatement.html | 2 +- Application/Admin/View/Statement/editCpStatement.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/Statement/createCpStatement.html b/Application/Admin/View/Statement/createCpStatement.html index ba5d11532..6eaf25ea8 100644 --- a/Application/Admin/View/Statement/createCpStatement.html +++ b/Application/Admin/View/Statement/createCpStatement.html @@ -291,7 +291,7 @@ -
+
diff --git a/Application/Admin/View/Statement/editCpStatement.html b/Application/Admin/View/Statement/editCpStatement.html index 353eab061..61da150d9 100644 --- a/Application/Admin/View/Statement/editCpStatement.html +++ b/Application/Admin/View/Statement/editCpStatement.html @@ -299,7 +299,7 @@
-
+
From 2f1d5fbd383a70bf778ab23f975521e946854f58 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 10 Jan 2020 16:19:36 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/StatementMangement/createDownstreamOrder.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/StatementMangement/createDownstreamOrder.html b/Application/Admin/View/StatementMangement/createDownstreamOrder.html index 2c3a66a2f..86454f390 100644 --- a/Application/Admin/View/StatementMangement/createDownstreamOrder.html +++ b/Application/Admin/View/StatementMangement/createDownstreamOrder.html @@ -51,7 +51,7 @@
银行账号: - +
@@ -85,7 +85,7 @@
联 系 人:    - +
开票项目: From f36202486d288b9bcb03b3fa40b64e888ecaccc6 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 10 Jan 2020 16:29:06 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/StatementMangement/createDownstreamOrder.html | 4 ++-- Application/Admin/View/StatementMangement/edit.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/View/StatementMangement/createDownstreamOrder.html b/Application/Admin/View/StatementMangement/createDownstreamOrder.html index 86454f390..07b87d5a4 100644 --- a/Application/Admin/View/StatementMangement/createDownstreamOrder.html +++ b/Application/Admin/View/StatementMangement/createDownstreamOrder.html @@ -147,12 +147,12 @@
联系人:    - +
联系电话: - +
diff --git a/Application/Admin/View/StatementMangement/edit.html b/Application/Admin/View/StatementMangement/edit.html index 02ceb35c8..320dd2449 100644 --- a/Application/Admin/View/StatementMangement/edit.html +++ b/Application/Admin/View/StatementMangement/edit.html @@ -148,12 +148,12 @@
联系人:    - +
联系电话: - +
From 57a1d8ed8c12e68a4d64a75b0a7293816ca62b7b Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Fri, 10 Jan 2020 17:02:42 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PublicController.class.php | 4 ++-- Public/Admin/excel/down_stream.xls | Bin 34816 -> 35328 bytes Public/Admin/excel/up_stream.xls | Bin 22528 -> 22528 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PublicController.class.php b/Application/Admin/Controller/PublicController.class.php index 673cc9b5a..679199be7 100644 --- a/Application/Admin/Controller/PublicController.class.php +++ b/Application/Admin/Controller/PublicController.class.php @@ -107,7 +107,7 @@ class PublicController extends \Think\Controller } $uid = $promote['id']; } else { - $partner = M('partner', 'tab_')->where(['link_man' => $mobile,])->find(); + $partner = M('partner', 'tab_')->where(['link_phone' => $mobile,])->find(); if ($partner) { /* 记录登录SESSION和COOKIES */ $cp_auth = array( @@ -131,7 +131,7 @@ class PublicController extends \Think\Controller session($session_name.'_sign', data_auth_sign($cp_auth)); } - $uid = $promote['id']; + $uid = $partner['id']; } } diff --git a/Public/Admin/excel/down_stream.xls b/Public/Admin/excel/down_stream.xls index ce63a4cc42d140ae11cf77c76e9f734ed607a760..49582ce0dd5b04787c03cec26ac12c6a501d1b1a 100644 GIT binary patch delta 1482 zcmZWpO>9(E6h8OOo7Xp;*D{@H9i~&88EOIq7p+!o`3E)p6i_12VoRqprP_kD4MIqa z+F6*oFow#R7($>sHxmB(C^69t-3S{(VBty<*yxhD)0n{co%>!p)8XBmckjF3cfRv; z?@WHi$QO*6cJTjmKdnYhKXWC%5vwArm(F3ECEXjalCM^s!{4Z_qSxMe-4M2W-@0P7w3-gx zq8g&M*W23KGpSb7rg;hwVeOs`y=!w@Y$g8@4e|ZxYTg*z!}F0AJ`#!YFAYEO<(SRi z#WwKSXg!~d_N|(yn?{tV1wrL87E(`9LmG;De^ZM1PORCQq`UdgZo5xnR+Brn_GhI= z`B5s#3#o`2TUs4oTyc8cDL&U2RpX00Y67c-%j<487^@GuJ)3_FH}`BJau9RHW}=6f zuVbFX#Yt~*YjQ!i_5-ww>a>cmOgcgz@fSmhwHaE0U13{bXEfVFMtcxVV%B2cV;6@KQyJ`aT`+s? z9pX{5HPG+#)%yNH~qPKgU@_3 Mp)iG@l%muV z6+ym5V4%wj(L+ct6-0yufe%)`)I$%MZxz%!-`#9;@^QY8dw;+4JHPLoZ}gThIw4Gy zGvB1gCDjAKWB(jeDv1^xYX1*tI}Qvj+-bnW%c0U~~vqqIgMk5%Zqts*Xx* zwsY|2i`(y}*Lm@gb>3zyP2;4=%a^Fh)W?!X}bOp{ar#QvB4f@N#pdzJzBoh_Dk;)y-M1gX(E^u$LOq4-wN_iy{ zm6FaG&o#+ut~Sk~PUhWfmt9*k=J12=me%XUykeZKzL6gZx)rJcYRu5gaL!Pm##aVt+AQ(__%D{usBW8VX8~L*cC&VE@8G-Y zDSO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Y=1PUxq)m!CP6F`&o$ z6hH0CY_*^2K?nB}SC82q>{aSCU8$B=I`UE`-;Rg0+452?w{bt&N Date: Fri, 10 Jan 2020 17:47:19 +0800 Subject: [PATCH 13/16] =?UTF-8?q?cp=E5=AF=B9=E8=B4=A6=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Public/cp_base.html | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/Application/Admin/View/Public/cp_base.html b/Application/Admin/View/Public/cp_base.html index c8fc9fe41..c6d7fb92c 100644 --- a/Application/Admin/View/Public/cp_base.html +++ b/Application/Admin/View/Public/cp_base.html @@ -70,7 +70,7 @@ --> -
  • 退出
  • +
  • 退出
  • {:session('cp_user_auth.username')} @@ -285,27 +285,7 @@ $(function(){ $window.resize(function(){ $("#main").css("min-height", $window.height() - 130); }).resize(); - $('.tuichujs').click(function(){ - $.ajax({ - type: 'POST', - async: false, - dataType: 'json', - url: "{:U('Public/logout')}", - success: function(data) { - updateAlert('退出成功','tip_right'); - setTimeout(function(){ - $('#tip').find('.tipclose').click(); - },1500); - location.reload(); - }, - error:function(){ - updateAlert("服务器故障!",'tip_error'); - setTimeout(function(){ - $('#tip').find('.tipclose').click(); - },1500); - } - }); - }); + /* 左边菜单高亮 */ url = window.location.pathname + window.location.search; url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, ""); From 71f2d75b8e4d53824eb6e3107d028c2bccc4475c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Sat, 11 Jan 2020 14:13:30 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=80=BB=E6=B5=81=E6=B0=B4=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=90=84=E4=B8=AA=E6=B8=A0=E9=81=93=E7=9A=84?= =?UTF-8?q?=E6=B5=81=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/QueryController.class.php | 57 ++++++++++++++++ Application/Admin/View/Query/marketList.html | 65 ++++++++++++++++++- 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 1779e918b..0b2d942e1 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -1118,4 +1118,61 @@ class QueryController extends ThinkController $this->display(); } + public function getChannelStream() { + + $map = []; +// setPowerPromoteIds($map,'root_id'); + + if ($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') { + if ($_REQUEST['promote_id']=='0') { + unset($map['root_id']); + $map['promote_account'] = '官方渠道'; + } else { + $map['root_id'] = $_REQUEST['promote_id']; + } + } + + if ($_REQUEST['game_name']) { + $map['game_names'] = $_REQUEST['game_name']; + } + + if ($_REQUEST['count_date']) { + $map['my_time'] = $_REQUEST['count_date']; + } + + if ($_REQUEST['device']) { + $map['game_name'] = ['like','%'.$_REQUEST['device'].'%']; + } + //获取spend表中的数据,同时根据会长id进行group分类 + $data = M('Spend','tab_') + ->field("FROM_UNIXTIME(pay_time,'%Y-%m') as my_time,sum(pay_amount) as pay_amount,game_id,game_name,SUBSTRING_INDEX(`game_name`,\"(\",1) as game_names,promote_id,promote_account,company_relation,company_belong,CASE WHEN SUBSTRING_INDEX(SUBSTRING_INDEX(`chain`,\"/\",2),\"/\",-1)='' THEN promote_id ELSE SUBSTRING_INDEX(SUBSTRING_INDEX(`chain`,\"/\",2),\"/\",-1) END as root_id,pay_way ") + ->join("left join tab_promote on promote_id = tab_promote.id") + ->where(['pay_status'=>1]) + ->group("my_time,game_names,root_id,pay_way") + ->order("my_time Desc") + ->select(false); + + //关联表获取会长账号名 + $data = M()->table('('.$data.') as a') + ->field("pay_amount,a.pay_way") + ->join("left join tab_promote on root_id = tab_promote.id") + ->join("left join tab_promote_game_ratio as tab_ratio on tab_ratio.game_id = a.game_id and tab_ratio.promote_id=root_id") + ->where($map) + ->group("my_time,game_names,root_id,pay_way") + ->order("my_time Desc") + ->select(); + + $returnData = ''; + + foreach($data as $key => $value) { + + $returnData .=get_pay_way($value['pay_way']).':'.$value['pay_amount']."
    "; + + + } +// echo $returnData;die(); + $this->ajaxReturn($returnData); + + } + } diff --git a/Application/Admin/View/Query/marketList.html b/Application/Admin/View/Query/marketList.html index 8372d688c..8cfddb092 100644 --- a/Application/Admin/View/Query/marketList.html +++ b/Application/Admin/View/Query/marketList.html @@ -29,6 +29,46 @@ } .select2-results__option[aria-selected] {font-size:12px;} .layui-layer-dialog .layui-layer-content{color:red} + .tooltip { + position: relative; + display: inline-block; + color: #056dae; + } + + .tooltip .tooltiptext { + /*visibility: hidden;*/ + width: 250%; + background-color: #fff; + color: #000; + text-align: center; + border-radius: 6px; + padding: 5px 0; + position: absolute; + z-index: 1; + bottom: 80%; + left: 0; + margin-left: -70%; + border: #000 solid 1px; + /*color: #000;*/ + } + + .tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: black transparent transparent transparent; + } + + .tooltip:hover .tooltiptext { + + color: #000; + /*visibility: visible;*/ + /*line-height: 20px;*/ + }