From ccda6e0b3989b32d56240dda950c53bd71cedfd8 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Mar 2020 15:13:36 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index d70685655..9d1972f58 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2221,7 +2221,6 @@ function a_array_unique($array){ */ function addOperationLog($options) { - return; $checkarr = ['op_type','url','key']; foreach ($checkarr as $v) { if(!array_key_exists($v,$options)){ From e31138b5a5a5fe3dff3093ece8a75144effc888f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 9 Mar 2020 16:38:51 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/TestWhiteListController.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Application/Admin/Controller/TestWhiteListController.class.php b/Application/Admin/Controller/TestWhiteListController.class.php index 51fb4c504..6182e81bf 100644 --- a/Application/Admin/Controller/TestWhiteListController.class.php +++ b/Application/Admin/Controller/TestWhiteListController.class.php @@ -167,6 +167,8 @@ class TestWhiteListController extends ThinkController $data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username']; $data['create_ime'] = time(); + M('user','tab_')->where(array('id'=>$data['user_id']))->save(['check_status'=>$data['show_status']]); + $whiteList = M('test_white_list','tab_')->add($data); if($whiteList) { //操作日志 From d64895896f9e9902fdbfad59fd90a0c43c4633d5 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Mar 2020 16:51:11 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinancePromoteController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index a2bbb9684..2dc730292 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -111,6 +111,7 @@ class FinancePromoteController extends AdminController "inside_cash_count"=>0, ); foreach($senddata as $k=>$v){ + $v['company_belong'] = $v['company_belong'] ?:0; $v['company_belong'] = getCompanyBlong($v['company_belong']); if(empty($v['company_name'])) $v['company_name']= $this->COMPANY_NAME; if(empty($v['p_id'])) $v['p_id']= "0"; From b8d4204ef9b05228a6cf714e1ae1d2106a37e188 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Mar 2020 17:09:07 +0800 Subject: [PATCH 04/15] ceshi --- Application/Admin/View/FinancePromote/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index 4c66fc343..547029875 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -215,7 +215,7 @@ {$data.company_name} {$data['promote_account']} - {$data['company_belong']} + {$data['company_belong1']} {$data.cash_count} From 75c934490e722805b112210a06930fc87e0b40d9 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Mar 2020 17:12:00 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E6=B5=8B=E8=AF=95=20=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/FinancePromote/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index 547029875..4c66fc343 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -215,7 +215,7 @@ {$data.company_name} {$data['promote_account']} - {$data['company_belong1']} + {$data['company_belong']} {$data.cash_count} From 71530c53e38e399ee9c9a8255c6bf2e414ba15b8 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Mar 2020 18:29:24 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=86=85=E5=85=85=E8=AF=A6=E6=83=85=E4=B8=8D?= =?UTF-8?q?=E7=AC=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancePromoteController.class.php | 4 +++- Application/Common/Common/extend.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 2dc730292..1a8d4c64e 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -789,7 +789,9 @@ class FinancePromoteController extends AdminController if($_REQUEST['promote_id'] == 0){ $isgf = true; } - $map['s.promote_id'] = $_REQUEST['promote_id']; + // $map['s.promote_id'] = $_REQUEST['promote_id']; + //内充需要底下全部的会员,包含自己的充值 + $map['s.promote_id'] = array("in",implode(",",array_column(getPrmoteChlidAccount($_REQUEST['promote_id'],"id"),"id")).",".$_REQUEST['promote_id']); } //检索 if (isset($_REQUEST['sn'])) { diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 9f9414132..abd908520 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1989,10 +1989,13 @@ function getPrmoteChlidAccount($id=0,$field="*") $promote = M("promote","tab_"); //获取自己的等级 $self = $promote->field("chain,level")->where("id = '{$id}'")->find(); - + if($self['chain'] == "/"){ + $self['chain'] = "/".$id."/"; + } $map['status'] = 1; $map["chain"] = array("LIKE","%{$self['chain']}%"); $map["level"] = array("GT",$self['level']); + $data = $promote->field($field)->where($map)->select(); if(empty($data)){return array();} From 958fb412272dc34a26bae9cd5fec6c94e2999994 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 11 Mar 2020 15:01:58 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=94=AF=E4=B8=80=E9=94=AE=E5=80=BC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ApplyController.class.php | 8 +++--- .../Admin/Controller/MendController.class.php | 10 ++++++- .../PresidentDepositController.class.php | 6 ++--- .../Controller/PromoteController.class.php | 2 +- .../PromoteGameRatioController.class.php | 10 +++---- .../Controller/SettlementController.class.php | 2 +- .../Controller/StatementController.class.php | 6 ++--- .../StatementMangementController.class.php | 26 +++++++++++-------- .../Controller/SupportController.class.php | 4 +-- .../TestResourceController.class.php | 6 ++--- .../Admin/Model/WithdrawModel.class.php | 6 +++-- 11 files changed, 50 insertions(+), 36 deletions(-) diff --git a/Application/Admin/Controller/ApplyController.class.php b/Application/Admin/Controller/ApplyController.class.php index b8fd8a25d..cc211f8c2 100644 --- a/Application/Admin/Controller/ApplyController.class.php +++ b/Application/Admin/Controller/ApplyController.class.php @@ -274,7 +274,7 @@ class ApplyController extends ThinkController foreach ($data as $key => $value) { - addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']); + addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']); } @@ -455,7 +455,7 @@ class ApplyController extends ThinkController foreach ($data as $key => $value) { - addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']); + addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-删除游戏分包']); } @@ -493,7 +493,7 @@ class ApplyController extends ThinkController foreach ($data as $key => $value) { - addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']); + addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']); } @@ -550,7 +550,7 @@ class ApplyController extends ThinkController foreach ($data as $key => $value) { - addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']); + addOperationLog(['op_type'=>1,'key'=>$value['game_name'].'/'.$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']); } diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 5197b7af0..ef8edb37a 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -146,12 +146,20 @@ class MendController extends ThinkController { if(!empty($create['remark'])){ $params['remark'] = $create['remark']; } + +// dump($create);die(); + $res = $promoteService->addShiftTask($params); if($res['status']){ $userData = M('user','tab_')->field('account')->where(['id'=>$create['user_id']])->find(); + $promoteToData = M('promote','tab_')->field('account')->where(['id'=>$create['prmoote_id_to']])->find(); + $promoteFromData = M('promote','tab_')->field('account')->where(['id'=>$create['promote_id']])->find(); + if ($create['promote_id'] == '0') { + $promoteFromData['account'] = '官方渠道'; + } - addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']); + addOperationLog(['op_type'=>1,'key'=>$userData['account'].'/'.$promoteFromData['account'].'/'.$promoteToData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']); $this->success('补链成功', U('lists'), 2); }else{ diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php index 5f935cd85..4e855d0ab 100644 --- a/Application/Admin/Controller/PresidentDepositController.class.php +++ b/Application/Admin/Controller/PresidentDepositController.class.php @@ -236,7 +236,7 @@ class PresidentDepositController extends ThinkController $data['update_time'] = time(); M('president_deposit', 'tab_')->add($data); - addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']); + addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']); return $this->success('保存成功', U('PresidentDeposit/records')); } @@ -352,7 +352,7 @@ class PresidentDepositController extends ThinkController foreach ($promoteData as $key => $value) { if ($value['amount']) { - addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']); + addOperationLog(['op_type'=>1,'key'=>$value['account'].'/'.$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']); } } @@ -402,7 +402,7 @@ class PresidentDepositController extends ThinkController foreach ($promoteData as $key => $value) { if ($value['amount']) { - addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']); + addOperationLog(['op_type'=>1,'key'=>$value['account'].'/'.$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']); } } diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 4f99ee409..298fb2beb 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -382,7 +382,7 @@ class PromoteController extends ThinkController } addOperationLog(['op_type'=>1, - 'key'=>$data['account'].$data['password'].$data['second_pwd'].$data['status'].$data['child_game_permission'].$data['mark1'].$data['mark2'], + 'key'=>$data['account'], 'op_name'=>'编辑推广员', 'url'=>U('Promote/edit',['id'=>$_POST['id']]), 'menu'=>'推广员-推广员管理-推广员列表-编辑推广员']); diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 9960d855c..949ad092f 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -206,7 +206,7 @@ class PromoteGameRatioController extends ThinkController $GetData = $_GET; unset($GetData['export']); - addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出公会分成管理','url'=>U('PromoteGameRatio/lists',$GetData),'menu'=>'统计-结算管理-公会分成管理']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出公会分成管理','url'=>U('PromoteGameRatio/lists',$GetData),'menu'=>'统计-结算管理-公会分成管理-导出数据']); data2csv($records,$csvTitle, $field); exit; @@ -337,7 +337,7 @@ class PromoteGameRatioController extends ThinkController } } - addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']); + addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']); } else {//新增 if (empty($params['promote_id'])) { @@ -392,7 +392,7 @@ class PromoteGameRatioController extends ThinkController } M()->commit(); - addOperationLog(['op_type'=>0,'key'=>getPromoteName($promoteId).getrelationGameName($relationGameId),'op_name'=>'生成游戏分成比例申请','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-生成游戏分成比例申请']); + addOperationLog(['op_type'=>0,'key'=>getPromoteName($promoteId).'/'.getrelationGameName($relationGameId),'op_name'=>'生成游戏分成比例申请','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-生成游戏分成比例申请']); } @@ -541,10 +541,10 @@ class PromoteGameRatioController extends ThinkController $spendSave['selle_ratio'] = $promoteGameRatio['ratio']; M('spend', 'tab_')->where($spendMap)->save($spendSave); - addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核通过']); + addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核通过']); } } else { - addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核拒绝']); + addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核拒绝']); } } diff --git a/Application/Admin/Controller/SettlementController.class.php b/Application/Admin/Controller/SettlementController.class.php index 6e731b7bb..ac61a2675 100644 --- a/Application/Admin/Controller/SettlementController.class.php +++ b/Application/Admin/Controller/SettlementController.class.php @@ -398,7 +398,7 @@ class SettlementController extends ThinkController $GetData = $_POST; - addOperationLog(['op_type'=>0,'key'=>getNowDate(),'op_name'=>'生成汇总结算单','url'=>U('settlement/generateSettlementSheet',$GetData),'menu'=>'推广员-结算单管理-生成汇总结算单']); + addOperationLog(['op_type'=>0,'key'=>$data['orderid'],'op_name'=>'生成汇总结算单','url'=>U('settlement/generateSettlementSheet',$GetData),'menu'=>'推广员-结算单管理-生成汇总结算单']); return $res ? $this->success('生成成功', true, true) : $this->error('生成失败', true, true); } diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index 4b0eeb18a..29f667c03 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -60,7 +60,7 @@ class StatementController extends ThinkController $statementData = M('statement','tab_')->where(['id'=>$id])->find(); - addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']); + addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']); $this->ajaxReturn(array("success"=>"ok","code"=>0)); }else{ @@ -325,12 +325,12 @@ class StatementController extends ThinkController ); if($id == 0){ // var_dump(1);die(); - addOperationLog(['op_type'=>0,'key'=>$company['partner'].getNowDate(),'op_name'=>'新增上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增上游对账单']); + addOperationLog(['op_type'=>0,'key'=>$company['partner'].'/'.getNowDate(),'op_name'=>'新增上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增上游对账单']); $res = M("statement","tab_")->add($adddata); }else{ - addOperationLog(['op_type'=>1,'key'=>$company['partner'].getNowDate(),'op_name'=>'编辑上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑上游对账单']); + addOperationLog(['op_type'=>1,'key'=>$company['partner'].'/'.getNowDate(),'op_name'=>'编辑上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑上游对账单']); $res = M("statement","tab_")->where("id = '{$id}'")->save($adddata); } diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index bd8fd468f..8158edefd 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -157,7 +157,7 @@ class StatementMangementController extends ThinkController if (!(M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->find())) { - addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']); + addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].'/'.getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']); M('statement','tab_')->add($insert); $this->ajaxReturn(['code'=>1, 'msg'=>'生成结算单成功']); @@ -216,7 +216,7 @@ class StatementMangementController extends ThinkController if ((M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->save($insert))) { - addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']); + addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].'/'.getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']); $this->ajaxReturn(['code'=>1, 'msg'=>'结算单编辑成功']); } else { @@ -237,7 +237,7 @@ class StatementMangementController extends ThinkController $statementData = M('statement','tab_')->where(['id'=>$id])->find(); - addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']); + addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']); $this->ajaxReturn(['code'=>0,'success'=>'ok']); } else { @@ -305,6 +305,7 @@ class StatementMangementController extends ThinkController 'remark' => I('remark'), 'reward_time' => strtotime(I('reward_time')) ]; + $accounts = I('account'); $user_types = I('user_type'); if ($accounts) { @@ -335,8 +336,8 @@ class StatementMangementController extends ThinkController if ($upt === false) { $this->error('保存失败'); } else { - - addOperationLog(['op_type'=>1,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']); + $companyName = M('partner','tab_')->field('partner')->where(['id'=>$data['company_id']])->find(); + addOperationLog(['op_type'=>1,'key'=>$companyName['partner'].'/'.(($data['reward_type']==1)?'奖励':'惩罚').'/'.$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理-修改奖惩记录']); $this->success('保存成功', U('StatementMangement/rewardManageList')); } @@ -345,7 +346,8 @@ class StatementMangementController extends ThinkController $data['creater_id'] = is_login(); $ins = M('reward_record', 'tab_')->add($data); - addOperationLog(['op_type'=>0,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']); + $companyName = M('partner','tab_')->field('partner')->where(['id'=>$data['company_id']])->find(); + addOperationLog(['op_type'=>0,'key'=>$companyName['partner'].'/'.(($data['reward_type']==1)?'奖励':'惩罚').'/'.$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理-新增奖惩记录']); return $ins ? $this->success('新增成功', U('StatementMangement/rewardManageList')) : $this->error('新增失败'); } @@ -359,7 +361,9 @@ class StatementMangementController extends ThinkController $upt = M('reward_record', 'tab_')->where(['id'=>$id])->delete(); - addOperationLog(['op_type'=>2,'key'=>$rewardRecordData['reward_type'].$rewardRecordData['company_type'].$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']); + $companyName = M('partner','tab_')->field('partner')->where(['id'=>$rewardRecordData['company_id']])->find(); + + addOperationLog(['op_type'=>2,'key'=>$companyName['partner'].'/'.(($rewardRecordData['reward_type']==1)?'奖励':'惩罚').'/'.$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']); return $upt ? $this->success('删除成功') : $this->error('删除失败'); } else { @@ -607,7 +611,7 @@ class StatementMangementController extends ThinkController if ($is_save) { - addOperationLog(['op_type'=>0,'key'=>'个人结算单'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']); + addOperationLog(['op_type'=>0,'key'=>'个人结算单'.'/'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']); $this->ajaxReturn(['status'=>1,'msg'=>'生成成功']); } else { @@ -837,7 +841,7 @@ class StatementMangementController extends ThinkController if ($is_save) { - addOperationLog(['op_type'=>1,'key'=>'个人结算单'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']); + addOperationLog(['op_type'=>1,'key'=>'个人结算单'.'/'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']); $this->ajaxReturn(['status'=>1,'msg'=>'修改成功']); } else { @@ -884,7 +888,7 @@ class StatementMangementController extends ThinkController foreach ($data as $key => $value) { - addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']); + addOperationLog(['op_type'=>1,'key'=>$value['company_name'].'/'.date('YmdHis',$value['statement_begin_time']).'/'.date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']); } @@ -912,7 +916,7 @@ class StatementMangementController extends ThinkController foreach ($data as $key => $value) { - addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']); + addOperationLog(['op_type'=>1,'key'=>$value['company_name'].'/'.date('YmdHis',$value['statement_begin_time']).'/'.date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']); } diff --git a/Application/Admin/Controller/SupportController.class.php b/Application/Admin/Controller/SupportController.class.php index bb45d8cec..7cb6cb7ff 100644 --- a/Application/Admin/Controller/SupportController.class.php +++ b/Application/Admin/Controller/SupportController.class.php @@ -95,7 +95,7 @@ class SupportController extends ThinkController { ->where(['tab_test_resource.id'=>$map['id']]) ->find(); - addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].$resourceData['user_account'],'op_name'=>'资源发放审核','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放审核']); + addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].'/'.$resourceData['user_account'],'op_name'=>'资源发放审核','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放审核']); $this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']); }else{ @@ -124,7 +124,7 @@ class SupportController extends ThinkController { ->where(['tab_test_resource.id'=>$map['id']]) ->find(); - addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].$resourceData['user_account'],'op_name'=>'资源发放拒绝','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放拒绝']); + addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].'/'.$resourceData['user_account'],'op_name'=>'资源发放拒绝','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放拒绝']); $this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']); }else{ diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index 5b3ef3ff3..62b37c5bf 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -446,7 +446,7 @@ class TestResourceController extends ThinkController } } - addOperationLog(['op_type'=>0,'key'=>$i_account.'-'.I('game_name').'-'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']); + addOperationLog(['op_type'=>0,'key'=>$i_account.'/'.I('game_name').'/'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']); } if (session('apply_status')==0) { @@ -562,7 +562,7 @@ class TestResourceController extends ThinkController $userData = M('test_resource','tab_')->where($map)->find(); - addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'-'.$userData['game_name'].'-'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']); + addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'/'.$userData['game_name'].'/'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']); $this->success('更新成功', U('index')); } @@ -654,7 +654,7 @@ class TestResourceController extends ThinkController //成功 } - addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'-'.$support['game_name'].'-'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']); + addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'/'.$support['game_name'].'/'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']); } M('test_resource','tab_')->commit(); //提交事物 diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index 09dff66f8..8ce6ae87b 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -241,7 +241,7 @@ class WithdrawModel extends Model{ return -1; } - addOperationLog(['op_type'=>1,'key'=>$promote['account'].$data['begin_time'].$data['end_time'].$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.$data['begin_time'].'/'.$data['end_time'].'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); M()->commit();//事物提交 return 1; @@ -385,6 +385,8 @@ class WithdrawModel extends Model{ return -1; } + addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.$data['begin_time'].'/'.$data['end_time'].'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + M()->commit();//事物提交 return 1; } @@ -496,7 +498,7 @@ class WithdrawModel extends Model{ if (!$withdrawId) { return 0;//补点失败 } - + addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.$data['begin_time'].'/'.$data['end_time'].'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); return 1; } From d5561209fdcc929e092237252c02978d05f1b31a Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 11 Mar 2020 16:45:24 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=94=AF=E4=B8=80=E9=94=AE=E5=80=BCbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/StatementController.class.php | 5 +++-- .../Admin/Controller/StatementMangementController.class.php | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index 29f667c03..ad2750d8f 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -55,11 +55,12 @@ class StatementController extends ThinkController { if(!isset($_REQUEST['id'])) $this->error("参数错误"); $id = $_REQUEST['id']; + + $statementData = M('statement','tab_')->where(['id'=>$id])->find(); + $res = M("statement","tab_")->where("id = '{$id}'")->delete(); if($res !== false){ - $statementData = M('statement','tab_')->where(['id'=>$id])->find(); - addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']); $this->ajaxReturn(array("success"=>"ok","code"=>0)); diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 8158edefd..1e66e5276 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -230,13 +230,12 @@ class StatementMangementController extends ThinkController if (!$id) { $this->ajaxReturn(['code'=>2000,'error'=>'no']); } + $statementData = M('statement','tab_')->where(['id'=>$id])->find(); $is_del = M('statement','tab_')->where(['id'=>$id])->delete(); if ($is_del) { - $statementData = M('statement','tab_')->where(['id'=>$id])->find(); - addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']); $this->ajaxReturn(['code'=>0,'success'=>'ok']); From f904ecec94e462d4a14396d1d712e02564ff7f32 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 11 Mar 2020 17:09:28 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=94=AF=E4=B8=80=E9=94=AE=E5=80=BCbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PresidentDepositController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php index 4e855d0ab..f2979972f 100644 --- a/Application/Admin/Controller/PresidentDepositController.class.php +++ b/Application/Admin/Controller/PresidentDepositController.class.php @@ -271,7 +271,7 @@ class PresidentDepositController extends ThinkController $data['update_time'] = time(); M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->save($data); - addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']); + addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']); return $this->success('保存成功'); } From a086b38d3e88d7d4ba28d75e2c2b057d7fb9168d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 11 Mar 2020 17:55:33 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=94=AF=E4=B8=80=E9=94=AE=E5=80=BCbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/WithdrawModel.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index 8ce6ae87b..93ccad890 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -241,7 +241,7 @@ class WithdrawModel extends Model{ return -1; } - addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.$data['begin_time'].'/'.$data['end_time'].'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); M()->commit();//事物提交 return 1; @@ -385,7 +385,7 @@ class WithdrawModel extends Model{ return -1; } - addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.$data['begin_time'].'/'.$data['end_time'].'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); M()->commit();//事物提交 return 1; @@ -498,7 +498,7 @@ class WithdrawModel extends Model{ if (!$withdrawId) { return 0;//补点失败 } - addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.$data['begin_time'].'/'.$data['end_time'].'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); return 1; } From 5d81a253db978779f6ed31b5504f06456ba4b033 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 13 Mar 2020 19:09:06 +0800 Subject: [PATCH 11/15] =?UTF-8?q?ip=E9=99=90=E5=88=B6=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=99=A8=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AmericaIpForbitController.php | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 Application/Admin/Controller/AmericaIpForbitController.php diff --git a/Application/Admin/Controller/AmericaIpForbitController.php b/Application/Admin/Controller/AmericaIpForbitController.php new file mode 100644 index 000000000..ec99c8154 --- /dev/null +++ b/Application/Admin/Controller/AmericaIpForbitController.php @@ -0,0 +1,118 @@ +where($map) + ->page($page,$row) + ->select(); + + $this->assgin('data',$data); + + $this->display(); + + } + + public function operateIp() { + + if (!I('id')) { + $this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']); + } else { + $id = I('id'); + } + + if (I('status')) { + $status = I('status'); + } else { + $status = 0; + } + + + $map['id'] = ['in',$id]; + + + $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->save(['status'=>$status]); + + if ($is_change) { + $this->ajaxReturn(['code'=>0]); + } else { + $this->ajaxReturn(['code'=>1]); + } + + } + + public function del() { + + if (!I('id')) { + $this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']); + } else { + $id = I('id'); + } + + $is_del = $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->delete(); + + if ($is_del) { + $this->ajaxReturn(['code'=>0]); + } else { + $this->ajaxReturn(['code'=>1]); + } + + } + + public function addUser() { + + $insert = []; + + $hav_user = M('user','tab_')->where(['account'=>I('user_account')])->find(); + + if (!$hav_user) { + $this->ajaxReturn(['msg'=>'用户不存在','code'=>1]); + } + + $insert['user_id'] = $hav_user['id']; + $insert['user_account'] = I('user_account'); + $insert['area'] = I('area'); + $insert['status'] = I('status'); + $insert['admin_id'] = I('admin_id'); + $insert['admin_account'] = I('admin_account'); + $insert['create_time'] = time(); + $insert['remarks'] = ''; + + $is_insert = M('forbit_ip','tab_')->add($insert); + + if ($is_insert) { + $this->ajaxReturn(['code'=>0]); + } else { + $this->ajaxReturn(['code'=>1]); + } + + + } + + +} \ No newline at end of file From c3adec70ecdbe8141a821a3b0790953a5272e02d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 16 Mar 2020 18:41:03 +0800 Subject: [PATCH 12/15] =?UTF-8?q?ip=E9=99=90=E5=88=B6=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AmericaIpForbitController.class.php | 237 ++++++++++++++++++ .../Controller/AmericaIpForbitController.php | 118 --------- Data/update.sql | 17 +- 3 files changed, 253 insertions(+), 119 deletions(-) create mode 100644 Application/Admin/Controller/AmericaIpForbitController.class.php delete mode 100644 Application/Admin/Controller/AmericaIpForbitController.php diff --git a/Application/Admin/Controller/AmericaIpForbitController.class.php b/Application/Admin/Controller/AmericaIpForbitController.class.php new file mode 100644 index 000000000..bd0e526c6 --- /dev/null +++ b/Application/Admin/Controller/AmericaIpForbitController.class.php @@ -0,0 +1,237 @@ +where($map) + ->page($page,$row) + ->order('create_time DESC') + ->select(); + + foreach ( $data as $key => $value ) { + + $data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']); + + } + + $count = M('forbit_ip','tab_') + ->where($map) + ->count(); + + $appleInteriorBuyStatus = M('tool','tab_')->where(['name'=>'apple_interior_buy'])->getField('status'); + + $setAppleInteriorBuyStatus = $appleInteriorBuyStatus?0:1; + + + $page = set_pagination($count, $row); + + $this->assign('_page', $page); + + $this->assign('apple_interior_buy',$appleInteriorBuyStatus); + $this->assign('set_apple_interior_buy',$setAppleInteriorBuyStatus); + + $this->assign('data',$data); + + $this->display(); + + } + + public function export() { + + $xlsName = 'ip限制白名单'; + + $xlsCell = array( + "玩家账号", "区域", '状态', '添加人', '添加时间' + ); + + $map = []; + + if ($_REQUEST['user_account']) { + $map['user_account'] = ['like',"%{$_REQUEST['user_account']}%"]; + } + + $csvFileName = $xlsName.'.csv'; + //设置好告诉浏览器要下载excel文件的headers + header('Content-Description: File Transfer'); + header('Content-Type: application/vnd.ms-excel'); + header('Content-Disposition: attachment; filename="'. $csvFileName .'"'); + header('Expires: 0'); + header('Cache-Control: must-revalidate'); + header('Pragma: public'); + $fp = fopen('php://output', 'a');//打开output流 + mb_convert_variables('GBK', 'UTF-8', $xlsCell); + fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 + + $accessNum = M('forbit_ip','tab_') + ->where($map) + ->count(); + + $accessNum =$accessNum['count']; + + $perSize = 2000;//每次查询的条数 + $pages = ceil($accessNum / $perSize); + + for($i = 1; $i <= $pages; $i++) { + $xlsData = M('forbit_ip','tab_') + ->field('user_account,area,status,admin_account,create_time') + ->where($map) + ->limit(($i-1)*$perSize ,$perSize) + ->order('create_time DESC') + ->select(); + + foreach($xlsData as $value) { + $value['create_time'] = date("Y-m-d H:i:s",$value['create_time']); + + if ($value['status'] == 0) { + $value['status'] = '限制'; + } else { + $value['status'] = '不限制'; + } + + mb_convert_variables('GBK', 'UTF-8', $value); + fputcsv($fp, $value); + } + unset($xlsData);//释放变量的内存 + //刷新输出缓冲到浏览器 + ob_flush(); + flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 + } + fclose($fp); + + $getData = $_GET; + unset($getData['id']); + unset($getData['xlsname']); + + } + + public function operateIp() { + + if (!I('id')) { + $this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']); + } else { + $id = I('id'); + } + + if (I('status')) { + $status = I('status'); + } else { + $status = 0; + } + + + $map['id'] = ['in',$id]; + + + $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->save(['status'=>$status]); + + if ($is_change) { + $this->ajaxReturn(['code'=>1]); + } else { + $this->ajaxReturn(['code'=>0]); + } + + } + + public function del() { + + if (!I('id')) { + $this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']); + } else { + $id = I('id'); + } + + $is_del = $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->delete(); + + if ($is_del) { + $this->ajaxReturn(['code'=>1]); + } else { + $this->ajaxReturn(['code'=>0]); + } + + } + + public function add() { + + $this->display(); + + } + + public function addUser() { + + $insert = []; + + $hav_user = M('user','tab_')->where(['account'=>I('account')])->find(); + + $auth = $_SESSION['onethink_admin']['user_auth']; + + if (!$hav_user) { + $this->error('用户不存在'); + } + + $hav_firbit = M('forbit_ip','tab_')->where(['user_account'=>I('account')])->find(); + + if ($hav_firbit) { + $this->error('该用户已添加封禁'); + } + + $insert['user_id'] = $hav_user['id']; + $insert['user_account'] = I('account'); + $insert['area'] = I('area'); + $insert['status'] = I('status'); + $insert['admin_id'] = $auth['uid']; + $insert['admin_account'] = $auth['username']; + $insert['create_time'] = time(); + $insert['remarks'] = ''; + + $is_insert = M('forbit_ip','tab_')->add($insert); + + if ($is_insert) { + $this->success('添加成功',U('AmericaIpForbit/index')); + } else { + $this->error('添加失败'); + } + + + } + + public function setAppleInteriorBuyStatus() { + + $status = I('status'); + + if (!$status && $status!='0') { + $this->ajaxReturn(['code'=>0]); + } + + $is_success = M('tool','tab_')->where(['name'=>'apple_interior_buy'])->save(['status'=>$status]); + + if ($is_success) { + $this->ajaxReturn(['code'=>1]); + } else { + $this->ajaxReturn(['code'=>0]); + } + + } + + +} \ No newline at end of file diff --git a/Application/Admin/Controller/AmericaIpForbitController.php b/Application/Admin/Controller/AmericaIpForbitController.php deleted file mode 100644 index ec99c8154..000000000 --- a/Application/Admin/Controller/AmericaIpForbitController.php +++ /dev/null @@ -1,118 +0,0 @@ -where($map) - ->page($page,$row) - ->select(); - - $this->assgin('data',$data); - - $this->display(); - - } - - public function operateIp() { - - if (!I('id')) { - $this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']); - } else { - $id = I('id'); - } - - if (I('status')) { - $status = I('status'); - } else { - $status = 0; - } - - - $map['id'] = ['in',$id]; - - - $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->save(['status'=>$status]); - - if ($is_change) { - $this->ajaxReturn(['code'=>0]); - } else { - $this->ajaxReturn(['code'=>1]); - } - - } - - public function del() { - - if (!I('id')) { - $this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']); - } else { - $id = I('id'); - } - - $is_del = $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->delete(); - - if ($is_del) { - $this->ajaxReturn(['code'=>0]); - } else { - $this->ajaxReturn(['code'=>1]); - } - - } - - public function addUser() { - - $insert = []; - - $hav_user = M('user','tab_')->where(['account'=>I('user_account')])->find(); - - if (!$hav_user) { - $this->ajaxReturn(['msg'=>'用户不存在','code'=>1]); - } - - $insert['user_id'] = $hav_user['id']; - $insert['user_account'] = I('user_account'); - $insert['area'] = I('area'); - $insert['status'] = I('status'); - $insert['admin_id'] = I('admin_id'); - $insert['admin_account'] = I('admin_account'); - $insert['create_time'] = time(); - $insert['remarks'] = ''; - - $is_insert = M('forbit_ip','tab_')->add($insert); - - if ($is_insert) { - $this->ajaxReturn(['code'=>0]); - } else { - $this->ajaxReturn(['code'=>1]); - } - - - } - - -} \ No newline at end of file diff --git a/Data/update.sql b/Data/update.sql index f6537638b..7e67edfff 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1444,4 +1444,19 @@ CREATE TABLE `tab_promote_game_available_balance` ( -- 2020-03-05 zyx spend添加索引 ALTER TABLE `tab_spend` ADD INDEX `pay_channel`(`pay_way`, `pay_status`, `game_id`) USING BTREE, -ADD INDEX `pay_channel_type`(`pay_status`, `pay_way`) USING BTREE; \ No newline at end of file +ADD INDEX `pay_channel_type`(`pay_status`, `pay_way`) USING BTREE; + +-- 2020-03-16 zyx 添加ip限制白名单表,内购tool表状态配置列 +INSERT INTO `tab_tool`(`name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('apple_interior_buy', '苹果内购通知开启', NULL, NULL, 1, 0, 1584345308); +CREATE TABLE `tab_forbit_ip` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NULL DEFAULT 0 COMMENT '用户id', + `user_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '用户账号', + `area` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '区域', + `status` tinyint(2) NULL DEFAULT 1 COMMENT '状态 1:不限制 0:限制', + `admin_id` int(11) NULL DEFAULT 1 COMMENT '管理员账号id', + `admin_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '管理员账号', + `create_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '创建时间', + `remarks` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '备注', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; \ No newline at end of file From 5f815370e8c3b91a835bf0eaf85fa0d5dd5cef2f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 16 Mar 2020 18:41:26 +0800 Subject: [PATCH 13/15] =?UTF-8?q?ip=E9=99=90=E5=88=B6=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/AmericaIpForbit/add.html | 139 +++++ .../Admin/View/AmericaIpForbit/index.html | 545 ++++++++++++++++++ 2 files changed, 684 insertions(+) create mode 100644 Application/Admin/View/AmericaIpForbit/add.html create mode 100644 Application/Admin/View/AmericaIpForbit/index.html diff --git a/Application/Admin/View/AmericaIpForbit/add.html b/Application/Admin/View/AmericaIpForbit/add.html new file mode 100644 index 000000000..0503d6b09 --- /dev/null +++ b/Application/Admin/View/AmericaIpForbit/add.html @@ -0,0 +1,139 @@ + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
玩家账号: + +
状态: + + + + +
区域 + +
+
+ + +
+ + + 返回 + +
+
+
+
+ + + +
+ + + + + + diff --git a/Application/Admin/View/AmericaIpForbit/index.html b/Application/Admin/View/AmericaIpForbit/index.html new file mode 100644 index 000000000..050af896d --- /dev/null +++ b/Application/Admin/View/AmericaIpForbit/index.html @@ -0,0 +1,545 @@ + + + + + + + + + + +
+ + +
+ + +
+ +
+ + +
+ 搜索 +
+ + + + + + + +
+
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 玩家账号区域状态添加人添加时间操作
aOh! 暂时还没有内容!
{$data.user_account}{$data.area}不限制限制{$data.admin_account}{$data.create_time} + 删除 + + 限制 + + 不限制 + +
+
+
+
+
+ + 导出 + + + {$_page|default=''} +
+ +
+ + + + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + From 1d27db663ab1e81fff6fc21051ed8df9a470032b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 16 Mar 2020 19:00:14 +0800 Subject: [PATCH 14/15] =?UTF-8?q?ip=E9=99=90=E5=88=B6=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=8F=90=E7=A4=BA=E8=AF=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/AmericaIpForbit/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/View/AmericaIpForbit/index.html b/Application/Admin/View/AmericaIpForbit/index.html index 050af896d..4c8276596 100644 --- a/Application/Admin/View/AmericaIpForbit/index.html +++ b/Application/Admin/View/AmericaIpForbit/index.html @@ -341,7 +341,7 @@ return $(elem).val(); }).get().join(","); - layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', { + layer.confirm('【警告】是否确认此操作', { btn: ['确认','取消'], title:false }, function(index) { @@ -396,7 +396,7 @@ return $(elem).val(); }).get().join(","); - layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', { + layer.confirm('【警告】是否确认此操作', { btn: ['确认','取消'], title:false }, function(index) { @@ -465,7 +465,7 @@ function limit(id,status) { - layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', { + layer.confirm('【警告】是否确认此操作', { btn: ['确认','取消'], title:false }, function(index) { @@ -517,7 +517,7 @@ function setAppleInteriorBuyStatus(status) { - layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', { + layer.confirm('【警告】是否确认打开全游戏苹果内购支付成功通知', { btn: ['确认','取消'], title:false }, function(index) { From e7aa7885e868486910bceb9b157ded0b3df837d1 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 16 Mar 2020 19:16:49 +0800 Subject: [PATCH 15/15] =?UTF-8?q?ip=E9=99=90=E5=88=B6=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=8F=90=E7=A4=BA=E8=AF=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/AmericaIpForbit/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/AmericaIpForbit/index.html b/Application/Admin/View/AmericaIpForbit/index.html index 4c8276596..0d14f0141 100644 --- a/Application/Admin/View/AmericaIpForbit/index.html +++ b/Application/Admin/View/AmericaIpForbit/index.html @@ -519,7 +519,8 @@ layer.confirm('【警告】是否确认打开全游戏苹果内购支付成功通知', { btn: ['确认','取消'], - title:false + area: ['380px','120px'], + title: false }, function(index) { $.ajax({