From 6cb25fe7feb73c7416cc825ab075d7f369377b0b Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Feb 2020 14:15:07 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 5 +++++ .../Controller/RepairController.class.php | 20 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index f4a9b235d..a62291e34 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1212,6 +1212,11 @@ class ExportController extends Controller flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('Spend/lists',$GetData),'menu'=>'充值-游戏订单-游戏充值-导出']); + exit(); // $xlsCell = array( // array('pay_order_number', "订单号"), diff --git a/Application/Admin/Controller/RepairController.class.php b/Application/Admin/Controller/RepairController.class.php index cd2823ffd..d0093e5e3 100644 --- a/Application/Admin/Controller/RepairController.class.php +++ b/Application/Admin/Controller/RepairController.class.php @@ -33,6 +33,13 @@ class RepairController extends ThinkController { ]); $rr = $spend->where(array('pay_order_number'=>$orderNo))->save(array('pay_game_status'=>1)); + //操作日志 + addOperationLog(array( + "op_type"=>1, + "key"=> $orderNo, + "url"=>U("Spend/lists",array("pay_order_number"=>$orderNo)) + )); + $this->ajaxReturn(array('status'=>1,'msg'=>'补单成功')); }else{ $this->ajaxReturn(array('status'=>0,'msg'=>'补单失败')); @@ -204,9 +211,16 @@ class RepairController extends ThinkController { } // todo: 分红 上级奖励等 - if ($tab == 'spend' && $cpFlag == 0) { - $this->ajaxReturn(['status'=>0,'msg'=>'充值补单成功,通知CP失败!']); - } + // if ($tab == 'spend' && $cpFlag == 0) { + // $this->ajaxReturn(['status'=>0,'msg'=>'充值补单成功,通知CP失败!']); + // } + //操作日志 + addOperationLog(array( + "op_type"=>1, + "key"=> $orderNo, + "menu"=>"充值-游戏订单-游戏充值-通知到账", + "url"=>U("Spend/lists",array("pay_order_number"=>$orderNo)) + )); $this->ajaxReturn(['status'=>1,'msg'=>'充值补单成功!']); } else { M('spend', 'tab_')->rollback(); From f6d991124bc92f4bead840a020cf7836eb913172 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Feb 2020 15:35:55 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=B8=81=E5=85=85?= =?UTF-8?q?=E5=80=BC-=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 8 +++++- .../RechargeSumController.class.php | 9 +++++++ .../Controller/RepairController.class.php | 26 +++++++++++++------ 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index a62291e34..1660278f3 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2172,7 +2172,13 @@ class ExportController extends Controller $xlsData[0]['authorization_all_num'] = $authorization_all_num; break; case 25: - $xlsCell = array( + //补单记录导出操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('BehaviorLog/singleSupplement',$GetData),'menu'=>'充值-游戏订单-补单记录管理-导出']); + + $xlsCell = array( array('type', '类型'), array('pay_order_number', '支付订单号'), array('extend', 'CP订单号'), diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index 42571a658..848f4e11c 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -10,6 +10,9 @@ class RechargeSumController extends ThinkController $startDateTime = empty($_REQUEST['timeStart']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['timeStart']; $endDateTime = empty($_REQUEST['timeEnd']) ? date('Y-m-d') : $_REQUEST['timeEnd']; + $_GET['timeStart'] = $startDateTime; + $_GET['timeEnd'] = $endDateTime; + $startTime = strtotime($startDateTime); $endTime = strtotime($endDateTime); $key = 0; @@ -138,6 +141,12 @@ class RechargeSumController extends ThinkController //判断是否执行导出 if (I('export') == 1) { + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('RechargeSum/summation',$GetData),'menu'=>'充值-游戏订单-充值汇总-导出']); + $this->exportSum($export_data); } $this->assign('meta_title', "充值汇总"); diff --git a/Application/Admin/Controller/RepairController.class.php b/Application/Admin/Controller/RepairController.class.php index d0093e5e3..9f111b602 100644 --- a/Application/Admin/Controller/RepairController.class.php +++ b/Application/Admin/Controller/RepairController.class.php @@ -211,16 +211,26 @@ class RepairController extends ThinkController { } // todo: 分红 上级奖励等 - // if ($tab == 'spend' && $cpFlag == 0) { - // $this->ajaxReturn(['status'=>0,'msg'=>'充值补单成功,通知CP失败!']); - // } + if ($tab == 'spend' && $cpFlag == 0) { + $this->ajaxReturn(['status'=>0,'msg'=>'充值补单成功,通知CP失败!']); + } //操作日志 - addOperationLog(array( + $optionarr = array( "op_type"=>1, - "key"=> $orderNo, - "menu"=>"充值-游戏订单-游戏充值-通知到账", - "url"=>U("Spend/lists",array("pay_order_number"=>$orderNo)) - )); + "key"=> $orderNo + ); + $pay_where = substr($orderNo, 0, 2); + if($pay_where == 'SP'){ + //游戏充值通知到账 + $optionarr['menu'] = "充值-游戏订单-游戏充值-通知到账"; + $optionarr['url'] = U("Spend/lists",array("pay_order_number"=>$orderNo)); + }elseif($pay_where == 'PF'){ + //平台币充值通知到账 + $optionarr['menu'] = "充值-平台币订单-平台币充值-通知到账"; + $optionarr['url'] = U("Deposit/lists",array("pay_order_number"=>$orderNo)); + } + addOperationLog($optionarr); + $this->ajaxReturn(['status'=>1,'msg'=>'充值补单成功!']); } else { M('spend', 'tab_')->rollback(); From 4cd078450c393cef3d04504151cf57f4dce7c31d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Feb 2020 15:52:03 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=B8=81=E5=85=85?= =?UTF-8?q?=E5=80=BC-=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 1660278f3..9f7b6a2ff 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1236,6 +1236,12 @@ class ExportController extends Controller // ); break; case 8: + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('Deposit/lists',$GetData),'menu'=>'充值-平台币订单-平台币充值-导出']); + $xlsName = $xlsName?$xlsName:L('Platform_currency_recharge'); if (isset($_REQUEST['user_account'])) { $map['user_account'] = array('like', '%' . trim($_REQUEST['user_account']) . '%'); @@ -2242,6 +2248,11 @@ class ExportController extends Controller } break; case 26: + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('Deposit/lists_secord',$GetData),'menu'=>'充值-平台币订单-平台币充值-推广员充值-导出']); + $xlsName = $xlsName?$xlsName:L('Platform_currency_recharge'); if (isset($_REQUEST['user_account'])) { $map['user_account'] = array('like', '%' . trim($_REQUEST['user_account']) . '%'); From 31a0a174bd4958be99b1ed2a9df14686eb32e852 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Feb 2020 16:23:59 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8F=91=E6=94=BE-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 6 +++++- .../PromoteCoinController.class.php | 19 +++++++++++++++++++ Application/Admin/View/PromoteCoin/send.html | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 9f7b6a2ff..3e89288d3 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5025,7 +5025,11 @@ class ExportController extends Controller } - + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('PromoteCoin/send_lists',$GetData),'menu'=>'充值-平台币订单-后台发放(推广员)-导出']); $this->exportExcel($xlsName, $xlsCell, $xlsData); diff --git a/Application/Admin/Controller/PromoteCoinController.class.php b/Application/Admin/Controller/PromoteCoinController.class.php index 6fddbcbef..af7f5b365 100644 --- a/Application/Admin/Controller/PromoteCoinController.class.php +++ b/Application/Admin/Controller/PromoteCoinController.class.php @@ -183,6 +183,25 @@ class PromoteCoinController extends ThinkController } if ($res) { + $keyname = getPromoteAccount(I('promote_id')); + $keyname .= ("/".abs(I('num'))); + $optionarr = array( + "op_type"=>1, + "key"=>$keyname, + "menu"=>"充值-平台币订单-后台发放(推广员)-", + "url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id'))) + ); + $promote_type = $_GET['promote_type']; + if($promote_type == '1'){ + $optionarr['menu'] .= "给会长发放"; + }elseif($promote_type == '2'){ + $optionarr['menu'] .= "给部门长发放"; + }elseif($promote_type == '3'){ + $optionarr['menu'] .= "给组长发放"; + }elseif($promote_type == '4'){ + $optionarr['menu'] .= "给组员发放"; + } + addOperationLog($optionarr); $this->success('操作成功!', U($url, array('model' => $model['name'], 'type' => $tt))); } else { $this->error('操作失败!', U($url, array('model' => $model['name'], 'type' => $tt))); diff --git a/Application/Admin/View/PromoteCoin/send.html b/Application/Admin/View/PromoteCoin/send.html index 8f37f009f..154e4691e 100644 --- a/Application/Admin/View/PromoteCoin/send.html +++ b/Application/Admin/View/PromoteCoin/send.html @@ -62,7 +62,7 @@
-
+
From 9cb8fadf39ad8330d2c271e1cae316ff395f799f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 27 Feb 2020 17:36:01 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 25 +++++++++++++++ .../Controller/StatementController.class.php | 5 +++ .../StatementMangementController.class.php | 31 ++++++++++++++++++- .../TestResourceController.class.php | 29 +++++++++++++++++ 4 files changed, 89 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 3e89288d3..8edbf87a4 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -361,6 +361,13 @@ class ExportController extends Controller flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + + $getData = $_GET; + unset($getData['id']); + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出实时注册','url'=>U('Promote/ch_reg_list', $getData),'menu'=>'推广员-数据管理-实时注册-导出实时注册']); + exit(); break; case 3: @@ -1029,6 +1036,13 @@ class ExportController extends Controller foreach ($xlsData as $key=>$v){ $xlsData[$key]['pay_way'] = get_info_status($v['pay_way'],21); } + + $getData = $_GET; + unset($getData['id']); + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出会长代充记录','url'=>U('Promote/agent_list', $getData),'menu'=>'推广员-数据管理-实时注册-导出会长代充记录']); + break; case 6: if (isset($_REQUEST['account'])) { @@ -6708,6 +6722,11 @@ class ExportController extends Controller } + $getData = $_GET; + unset($getData['id']); + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出平台币转移记录','url'=>U('PromoteCoin/record', $getData),'menu'=>'推广员-数据管理-实时注册-导出平台币转移记录']); $this->exportExcel($xlsName, $xlsCell, $xlsData); @@ -7138,6 +7157,12 @@ class ExportController extends Controller flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } + $getData = $_GET; + unset($getData['id']); + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出实时充值','url'=>U('Promote/spend_list', $getData),'menu'=>'推广员-数据管理-实时注册-导出实时充值']); + fclose($fp); exit(); // $this->exportExcel($xlsName, $xlsCell, $xlsData); diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index c26264535..4b0eeb18a 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -57,6 +57,11 @@ class StatementController extends ThinkController $id = $_REQUEST['id']; $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)); }else{ $this->ajaxReturn(array("error"=>"database error","code"=>2000)); diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 6105a1e2a..357521b3c 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -234,6 +234,11 @@ class StatementMangementController extends ThinkController $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']); } else { $this->ajaxReturn(['code'=>2000,'error'=>'no']); @@ -601,6 +606,9 @@ class StatementMangementController extends ThinkController $is_save = M('statement','tab_')->add($data); if ($is_save) { + + addOperationLog(['op_type'=>0,'key'=>'个人结算单'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']); + $this->ajaxReturn(['status'=>1,'msg'=>'生成成功']); } else { $this->ajaxReturn(['status'=>0,'msg'=>'生成失败']); @@ -636,7 +644,7 @@ class StatementMangementController extends ThinkController $statement = M('statement','tab_') ->field('ext_field') - ->where(['statement_type'=>2]) + ->where('ext_field is not null') ->select(); $withdrawData = []; @@ -828,6 +836,9 @@ class StatementMangementController extends ThinkController // echo M('statement','tab_')->_sql();die(); if ($is_save) { + + addOperationLog(['op_type'=>1,'key'=>'个人结算单'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']); + $this->ajaxReturn(['status'=>1,'msg'=>'修改成功']); } else { $this->ajaxReturn(['status'=>0,'msg'=>'修改失败']); @@ -868,6 +879,15 @@ class StatementMangementController extends ThinkController $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>1]); if ($isVerify) { + + $data = M('statement','tab_')->where(['id'=>['in',$order]])->select(); + + 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'=>'推广员-结算管理-结算单管理-结算单审核通过']); + + } + $this->ajaxReturn(['status'=>1]); } else { $this->ajaxReturn(['status'=>0]); @@ -887,6 +907,15 @@ class StatementMangementController extends ThinkController $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>2]); if ($isVerify) { + + $data = M('statement','tab_')->where(['id'=>['in',$order]])->select(); + + 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'=>'推广员-结算管理-结算单管理-结算单审核通过']); + + } + $this->ajaxReturn(['status'=>1]); } else { $this->ajaxReturn(['status'=>0]); diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index 941c167f3..8ac8ffc67 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -81,6 +81,11 @@ class TestResourceController extends ThinkController $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); if ($isFreeze) { + + $userData = M('user','tab_')->where("id=".$supportId)->find(); + + addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑冻结账号','url'=>U('StatementMangement/lists'),'menu'=>'推广员-测试资源-扶持号管理-冻结账号']); + $this->ajaxReturn(['status'=>1, 'msg'=> '冻结成功']); } else { $this->ajaxReturn(['status'=>0, 'msg'=> '冻结失败']); @@ -100,6 +105,11 @@ class TestResourceController extends ThinkController $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); if ($isFreeze) { + + $userData = M('user','tab_')->where("id=".$supportId)->find(); + + addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑解冻账号','url'=>U('StatementMangement/lists'),'menu'=>'推广员-测试资源-扶持号管理-解冻账号']); + $this->ajaxReturn(['status'=>1, 'msg'=> '启用成功']); } else { $this->ajaxReturn(['status'=>0, 'msg'=> '启用失败']); @@ -119,6 +129,11 @@ class TestResourceController extends ThinkController $passward = M('user','tab_')->where("id=".$supportId)->save($data); if ($passward) { + + $userData = M('user','tab_')->where("id=".$supportId)->find(); + + addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑重置密码','url'=>U('StatementMangement/lists'),'menu'=>'推广员-测试资源-扶持号管理-重置密码']); + $this->ajaxReturn(['status'=>1, 'msg'=> '新密码:'.$password]); } else { $this->ajaxReturn(['status'=>0, 'msg'=> '重置密码失败']); @@ -376,6 +391,8 @@ class TestResourceController extends ThinkController // $map['apply_status']=['neq',0]; $map['apply_type']=0; $list= M('test_resource', 'tab_')->where($map)->find(); + +// dump($list);die(); if ($list) { M('test_resource', 'tab_')->rollback();//回滚 $this->error(I('user_account')[$i].'账号已存在'); @@ -423,12 +440,16 @@ class TestResourceController extends ThinkController $this->error('请输入账号'); } } + + 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) { session('apply_status', null); $this->error('请输入账号'); } M('test_resource', 'tab_')->commit(); //提交事物 + $this->success('添加成功',U('TestResource/index')); } else { $this->meta_title = '新增测试账号'; @@ -471,6 +492,11 @@ class TestResourceController extends ThinkController if($res===false){ $this->error('更新失败'); }else{ + + $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'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']); + $this->success('更新成功', U('index')); } } @@ -557,6 +583,9 @@ class TestResourceController extends ThinkController }else{ //成功 } + + 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(); //提交事物 $this->success('申请成功',U('index')); From 60edd1f8ca6095bd38ffaec2f0fa0987da936361 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Feb 2020 17:47:52 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8F=91=E6=94=BE?= =?UTF-8?q?=EF=BC=88=E7=8E=A9=E5=AE=B6=EF=BC=891-=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 --- .../Controller/ExportController.class.php | 12 ++++ .../PromoteCoinController.class.php | 61 +++++++++++++------ .../Admin/Event/FirstpayEvent.class.php | 18 +++++- 3 files changed, 73 insertions(+), 18 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 3e89288d3..713c54283 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5046,6 +5046,12 @@ class ExportController extends Controller if($_REQUEST['type']==2) { + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('PromoteCoin/deduct_lists',$GetData),'menu'=>'充值-平台币订单-平台币收回-推广员收回-导出']); + $xlsCell = array( array('promote_account','所属推广员'), array('promote_type','推广员等级'), @@ -5076,6 +5082,12 @@ class ExportController extends Controller $model = M('PromoteCoin','tab_'); }else { + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('PromoteCoin/deduct_lists',$GetData),'menu'=>'充值-平台币订单-平台币收回-玩家收回-导出']); + $xlsCell = array( array('user_account','玩家账号'), array('coin_type','收回类型'), diff --git a/Application/Admin/Controller/PromoteCoinController.class.php b/Application/Admin/Controller/PromoteCoinController.class.php index af7f5b365..0a08fbcd6 100644 --- a/Application/Admin/Controller/PromoteCoinController.class.php +++ b/Application/Admin/Controller/PromoteCoinController.class.php @@ -183,25 +183,52 @@ class PromoteCoinController extends ThinkController } if ($res) { - $keyname = getPromoteAccount(I('promote_id')); - $keyname .= ("/".abs(I('num'))); - $optionarr = array( - "op_type"=>1, - "key"=>$keyname, - "menu"=>"充值-平台币订单-后台发放(推广员)-", - "url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id'))) - ); - $promote_type = $_GET['promote_type']; - if($promote_type == '1'){ - $optionarr['menu'] .= "给会长发放"; - }elseif($promote_type == '2'){ - $optionarr['menu'] .= "给部门长发放"; - }elseif($promote_type == '3'){ - $optionarr['menu'] .= "给组长发放"; - }elseif($promote_type == '4'){ - $optionarr['menu'] .= "给组员发放"; + //------操作日志-begin + if($type == 1){ + //发放 + $keyname = getPromoteAccount(I('promote_id')); + $keyname .= ("/".abs(I('num'))); + $optionarr = array( + "op_type"=>1, + "key"=>$keyname, + "menu"=>"充值-平台币订单-后台发放(推广员)-", + "url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id'))) + ); + $promote_type = $_GET['promote_type']; + if($promote_type == '1'){ + $optionarr['menu'] .= "给会长发放"; + }elseif($promote_type == '2'){ + $optionarr['menu'] .= "给部门长发放"; + }elseif($promote_type == '3'){ + $optionarr['menu'] .= "给组长发放"; + }elseif($promote_type == '4'){ + $optionarr['menu'] .= "给组员发放"; + } + }else{ + //收回 + $optionarr = array( + "op_type"=>1, + "menu"=>"充值-平台币订单-平台币收回-", + "url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id'))) + ); + if($tt == 1){ + //收回玩家 + $userid = I('user_id'); + $user_account = M("User","tab_")->where("id={$userid}")->field("account")->find()['account']; + $keyname = ($user_account."/".abs(I('num'))); + $optionarr['key'] = $keyname; + $optionarr['menu'] .= "玩家收回"; + $optionarr['url'] = U("PromoteCoin/deduct_lists",array("type"=>"1","account"=>$user_account)); + }else{ + //收回推广员 + $optionarr['key'] = (getPromoteAccount(I('promote_id'))."/".abs(I('num'))); + $optionarr['menu'] .= "推广员收回"; + $optionarr['url'] = U("PromoteCoin/deduct_lists",array("type"=>"2","promote_id"=>I('promote_id'))); + } } addOperationLog($optionarr); + //-------操作日志-end + $this->success('操作成功!', U($url, array('model' => $model['name'], 'type' => $tt))); } else { $this->error('操作失败!', U($url, array('model' => $model['name'], 'type' => $tt))); diff --git a/Application/Admin/Event/FirstpayEvent.class.php b/Application/Admin/Event/FirstpayEvent.class.php index 537ee5b33..e8a52d79c 100644 --- a/Application/Admin/Event/FirstpayEvent.class.php +++ b/Application/Admin/Event/FirstpayEvent.class.php @@ -36,6 +36,7 @@ class firstpayEvent extends Controller { $add['op_account']=session("user_auth.username"); $add['create_time']=NOW_TIME; $prov=M("provide","tab_")->add($add); + $this->feAddOperationLog($account,$amount); $this->success("提交成功",U("Provide/lists",["type"=>2])); }else{ $this->error("该玩家还未玩此游戏",U("bdfirstpay")); @@ -91,6 +92,7 @@ class firstpayEvent extends Controller { $add['create_time']=NOW_TIME; $prov=M("provide","tab_")->add($add); if($prov){ + $this->feAddOperationLog($add['user_account'],$amount); $a++; } } @@ -179,7 +181,10 @@ class firstpayEvent extends Controller { $arr['amount'] = (double)$v['C']; $arr['create_time'] = NOW_TIME; $arr['create_time'] = NOW_TIME; - D('Provide')->add($arr); + $res = D('Provide')->add($arr); + if($res){ + $this->feAddOperationLog($arr['user_account'],$arr['amount']); + } } $a = json_encode($errorList); $json = urlencode(json_encode($errorList)); @@ -189,4 +194,15 @@ class firstpayEvent extends Controller { $this->assign ( 'json', $json); $this->success('成功:'.$succNum.';失败:'.$errorNum,U("Provide/lists",["type"=>2])); } + //操作日志 + public function feAddOperationLog($user,$num) + { + $optionarr = array( + "op_type"=>0, + "key"=>($user."/".$num), + "menu"=>"充值-绑币订单-后台发放玩家-绑币发放", + "url"=>U("Provide/lists",array("model"=>"provide","user_account"=>$user)) + ); + addOperationLog($optionarr); + } } From cb696c923ff9b5f11f72eeb43e678629cab00753 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Feb 2020 09:44:15 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8F=91=E6=94=BE?= =?UTF-8?q?=EF=BC=88=E7=8E=A9=E5=AE=B6=EF=BC=89-=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 --- .../Controller/ExportController.class.php | 6 ++++++ .../Controller/ProvideController.class.php | 21 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index aab8d8b6a..de2715dd7 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1396,6 +1396,12 @@ class ExportController extends Controller array('create_time', "发放时间", 'time_format', '*'), array('', "共计发放{$total}"), ); + //操作日志 + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('Provide/lists',$GetData),'menu'=>'充值-绑币订单-后台发放(玩家)-导出']); + break; case 10: $xlsName = $xlsName?$xlsName:"绑定平台币消费"; diff --git a/Application/Admin/Controller/ProvideController.class.php b/Application/Admin/Controller/ProvideController.class.php index 3711bd579..4f8aa88fc 100644 --- a/Application/Admin/Controller/ProvideController.class.php +++ b/Application/Admin/Controller/ProvideController.class.php @@ -117,19 +117,34 @@ class ProvideController extends ThinkController { $maps['game_id']=$pro[$i]['game_id']; $user=M("UserPlay","tab_")->where($maps)->setInc("bind_balance",$pro[$i]['amount']); $list->where($map)->setField("status",1); + //操作日志 + addOperationLog(array( + "op_type"=>1, + "key"=> $pro[$i]['pay_order_number'], + "url"=>U("Provide/lists",array("user_account"=>$pro[$i]['user_account'])) + )); } $this->success("充值成功",U("lists",array('type'=>2))); } public function delprovide($ids=''){ - if (empty($ids)) { - $this->error('请选择要操作的数据!'); - } + if (empty($ids)) { + $this->error('请选择要操作的数据!'); + } $list=M("provide","tab_"); $map['id']=array("in",$ids); $map['status']=0; + //操作日志 + $sre = $list->where($map)->select(); $delete=$list->where($map)->delete(); if($delete){ + foreach ($sre as $k => $v) { + addOperationLog(array( + "op_type"=>2, + "key"=> $v['pay_order_number'], + "url"=>U("Provide/lists",array("user_account"=>$v['user_account'])) + )); + } $this->success("批量删除成功!",U("lists",array('type'=>2))); }else{ $this->error("批量删除失败!",U("lists",array('type'=>2))); From 71f2453bb4cab58433dab143e266499b09cb8dfb Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Feb 2020 10:25:28 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E7=BB=91=E5=B8=81=E5=9B=9E=E6=94=B6-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DeductBindRecordController.class.php | 9 ++++++++- .../Admin/Controller/ExportController.class.php | 12 ++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/DeductBindRecordController.class.php b/Application/Admin/Controller/DeductBindRecordController.class.php index 35000b83e..68d43faa9 100644 --- a/Application/Admin/Controller/DeductBindRecordController.class.php +++ b/Application/Admin/Controller/DeductBindRecordController.class.php @@ -99,7 +99,14 @@ class DeductBindRecordController extends ThinkController { $result = M('UserPlay','tab_')->where($user_play_map)->setDec('bind_balance',$data["quantity"]); $result1 = $deduct->data($data)->add(); if($result !== false && $result1 !==false){ - M()->commit();$this->success("操作成功",U('DeductBindRecord/recordLists')); + M()->commit(); + //操作日志 + addOperationLog(array( + "op_type"=>1, + "key"=> $data["user_account"]."/".$data["quantity"], + "url"=>U("DeductBindRecord/recordLists",array("account"=>$data["user_account"])) + )); + $this->success("操作成功",U('DeductBindRecord/recordLists')); }else{ //事务回滚 M()->rollback(); diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index de2715dd7..aae776029 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5227,8 +5227,8 @@ class ExportController extends Controller } - - + //操作日志 + $this->exportAddOperationLog('DeductBindRecord/recordLists','充值-绑币订单-绑币收回-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -8238,5 +8238,13 @@ class ExportController extends Controller excelDownStreamTemplate(); } + //导出操作日志 + public function exportAddOperationLog($url,$menu) + { + $GetData = $_GET; + unset($GetData['xlsname']); + unset($GetData['id']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U($url,$GetData),'menu'=>$menu]); + } } From 31c77320022458c5933dbcc9da1d2b6563d9447c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Feb 2020 11:49:12 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1-=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 10 ++++-- .../FinancePromoteController.class.php | 32 +++++++++++++++++++ .../Controller/PayChannelController.class.php | 4 +++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index aae776029..0485c58ff 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -7427,7 +7427,7 @@ class ExportController extends Controller 'inside_cash_count'=>$sumInside, 'all_cash_count'=>$sumAll]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/gameStatistics","充值-财务管理-游戏统计-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -7511,6 +7511,7 @@ class ExportController extends Controller 'pay_time'=>'平台币:' . $sumBalance, 'user_account'=>'绑币:' . $sumInside]]; $xlsData = array_merge($xlsData,$sumData); + $this->exportAddOperationLog("Finance/gameStatisticsDetail","充值-财务管理-游戏统计-查看-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -7592,12 +7593,14 @@ class ExportController extends Controller $join = false; if ($map['pay_way'] ==-1) {//绑定币 $xlsCell[] = array('bind_balance','绑定币余额'); - $xlsName = $game_name . '内充支出明细'; + $title = '内充支出明细'; + $xlsName = $game_name . $title; $field2 = $field . ',bind_balance'; $join = 'left join tab_user_play as p on p.user_id = tab_spend.user_id and tab_spend.game_id=p.game_id'; } elseif ($map['pay_way'] ==0) {//平台币 $xlsCell[] = array('balance','平台币余额'); - $xlsName = $game_name . '平台币直充明细'; + $title = '平台币直充明细'; + $xlsName = $game_name . $title; $field2 = $field . ',balance'; $join = 'left join tab_user as u on u.id = tab_spend.user_id'; } @@ -7615,6 +7618,7 @@ class ExportController extends Controller 'cost'=> $total_cost, 'pay_amount'=> $total_pay_amount]]; $xlsData = array_merge($xlsData,$sumData); + $this->exportAddOperationLog("Finance/coinDetail","充值-财务管理-游戏统计-".$title."-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index c910dc112..706989d0c 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -128,6 +128,11 @@ class FinancePromoteController extends AdminController } $data = my_sort($data, $data_order_type, (int)$data_order); if(isset($_REQUEST['export'])){ + //操作日志 + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-公会统计-导出"]); + data2csv($data,'公会统计',array( "company_name"=>"推广公司", "promote_account"=>"会长渠道", @@ -322,6 +327,11 @@ class FinancePromoteController extends AdminController $data = my_sort($data, $data_order_type, (int)$data_order); if(isset($_REQUEST['export'])){ + + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-公会统计-渠道查看-导出"]); + data2csv($data,'渠道统计',array( "company_name"=>"推广公司", "promote_account"=>"推广员账号", @@ -431,6 +441,11 @@ class FinancePromoteController extends AdminController if(!$value['game_name']) $value['game_name'] = "无"; } if (isset($_REQUEST['export'])) { + + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-公会统计-游戏统计-导出"]); + data2csv($data,$title, array( "company_name"=>"推广公司", "account"=>"会长账号", @@ -541,6 +556,11 @@ class FinancePromoteController extends AdminController $data[$key]['pay_way'] = getPayType($value['pay_way']); } if (isset($_REQUEST['export'])) { + + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-公会统计-订单查看-导出"]); + data2csv($data,$title, array( "pay_order_number"=>"支付订单号", "pay_time"=>"充值时间", @@ -698,6 +718,8 @@ class FinancePromoteController extends AdminController } if (isset($_REQUEST['export'])) { + + $field = array( "pay_order_number"=>"支付订单号", "pay_time"=>"充值时间", @@ -716,6 +738,11 @@ class FinancePromoteController extends AdminController $field["balance"] = "平台币余额"; $title = "平台币直充明细"; } + + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-公会统计-".$title."-导出"]); + data2csv($data,$title,$field); } $count = D("spend")->getSpendData($map,$field,$group,$order); @@ -864,6 +891,11 @@ class FinancePromoteController extends AdminController "mark"=>"交易说明", "create_time"=>"交易时间" ); + + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-公会统计-"."平台币内充明细"."-导出"]); + data2csv($senddata,"平台币内充明细",$field); } diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index b9939f2aa..9035e9e2b 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -300,6 +300,10 @@ class PayChannelController extends ThinkController unset($offcialData); unset($spreadData); } + //操作日志 + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-支付渠道查看-导出"]); db2csv(array_merge(array_merge(array_merge(array_merge( array_merge(array_merge( From a9f984d0aa1f7a759ed6067bb03c8b5363069233 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Feb 2020 14:10:13 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E5=85=85=E5=80=BC=E5=A4=A7=E5=9D=97-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97ok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 14 +++++++------- .../Admin/Controller/TestOrderController.class.php | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 0485c58ff..c010b6ed3 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -7253,7 +7253,7 @@ class ExportController extends Controller 'balance_coin_count'=>$sumData['balance_coin_count'], 'all_count'=>$sumData['all_count']]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/index","充值-财务管理-月结统计-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -7359,7 +7359,7 @@ class ExportController extends Controller 'inside_cash_count'=>$sumInside, 'all_cash_count'=>$sumAll]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/index","充值-财务管理-月结统计-游戏查看-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -7726,7 +7726,7 @@ class ExportController extends Controller 'pay_way'=>$sum]]; // $xlsData = array_merge($xlsData,$sumData); // dump($xlsData);die(); - + $this->exportAddOperationLog("Finance/gameFinanceDetail","充值-财务管理-月结统计-充值流水-导出"); $this->exportNewExcel($xlsName, $xlsCell, $xlsData); } @@ -7854,7 +7854,7 @@ class ExportController extends Controller 'all_count'=>$sumData['all_count'], ]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/getRootUser","充值-财务管理-月结统计-渠道查看-会长-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -7932,7 +7932,7 @@ class ExportController extends Controller 'all_count'=>$sumData['all_count'], ]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/getMiniterUser","充值-财务管理-月结统计-渠道查看-部门长-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -8012,7 +8012,7 @@ class ExportController extends Controller 'all_count'=>$sumData['all_count'], ]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/getParentUser","充值-财务管理-月结统计-渠道查看-组长-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -8082,7 +8082,7 @@ class ExportController extends Controller 'all_count'=>$sumData['all_count'], ]]; $xlsData = array_merge($xlsData,$sumData); - + $this->exportAddOperationLog("Finance/getPromoteUser","充值-财务管理-月结统计-渠道查看-组员-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); } diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index ffda1457e..7feb70082 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -85,6 +85,13 @@ class TestOrderController extends ThinkController $isSuccess = M('test_order','tab_')->add($data); if ($isSuccess) { + //操作日志 + addOperationLog(array( + "op_type"=>0, + "key"=>$data['order_no'], + "menu"=>"充值-财务管理-测试服订单管理-订单录入", + "url"=>U("TestOrder/lists",array("order_no"=>$data['order_no'])) + )); $this->ajaxReturn(['status'=>1,'msg'=>'订单录入成功']); } else { $this->ajaxReturn(['status'=>0,'msg'=>'订单录入失败']); From ab6e063c9ad119d48924c2687a1abe27693823bc Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Feb 2020 14:23:31 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=AE=A1=E7=90=86=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ApplyController.class.php | 35 ++++++++ .../Controller/ExportController.class.php | 21 +++++ .../Admin/Controller/MendController.class.php | 8 ++ .../PromoteCompanyController.class.php | 19 +++++ .../Controller/PromoteController.class.php | 79 +++++++++++++++++++ .../Controller/SupportController.class.php | 18 +++++ 6 files changed, 180 insertions(+) diff --git a/Application/Admin/Controller/ApplyController.class.php b/Application/Admin/Controller/ApplyController.class.php index ac210e0e9..17ac0548e 100644 --- a/Application/Admin/Controller/ApplyController.class.php +++ b/Application/Admin/Controller/ApplyController.class.php @@ -269,6 +269,15 @@ class ApplyController extends ThinkController public function android_set() { + + $data = M('apply','tab_')->where(['id'=>['in',$_REQUEST['ids']]])->select(); + + foreach ($data as $key => $value) { + + addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']); + + } + $this -> set_status(); } @@ -403,6 +412,7 @@ class ApplyController extends ThinkController public function android_del($model = null, $ids = null) { + \Think\Log ::actionLog('Apply/android_del', 'Apply', 1); $this -> del($model, $ids); } @@ -415,6 +425,7 @@ class ApplyController extends ThinkController public function del($model = null, $ids = null) { + $source = D(self::model_name); $ids || $this -> error("请选择要操作的数据!"); $id = array_unique((array) $ids); @@ -439,6 +450,15 @@ class ApplyController extends ThinkController } + + $data = M('apply','tab_')->where(['id'=>['in',$_REQUEST['ids']]])->select(); + + foreach ($data as $key => $value) { + + addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']); + + } + $model = M('Model') -> getByName(self::model_name); /*通过Model名称获取Model完整信息*/ parent ::del($model["id"], $ids); } @@ -468,6 +488,15 @@ class ApplyController extends ThinkController $successNum ++; } } + + $data = M('apply','tab_')->where(['id'=>['in',$ids]])->select(); + + foreach ($data as $key => $value) { + + addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']); + + } + $msg = "已加入打包队列,刷新此页面可查看当前打包状态;\r\n加入成功:" . $successNum . "个。" . "失败:" . $errorNuem . "个"; $this -> success($msg, U('Apply/and_lists', array('p' => $p, 'type' => $type))); exit; @@ -898,6 +927,12 @@ class ApplyController extends ThinkController $res = M('config') -> where(array('name' => $config_key)) -> save($config); S('DB_CONFIG_DATA', null); if ($res !== false) { + if ($val == 0) { + addOperationLog(['op_type'=>1,'key'=>getNowDate(),'op_name'=>'关闭自动审核','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-关闭自动审核']); + } else if ($val == 1) { + addOperationLog(['op_type'=>1,'key'=>getNowDate(),'op_name'=>'开启自动审核','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-开启自动审核']); + } + $this -> success('操作成功'); } else { $this -> error('操作失败'); diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index c010b6ed3..29a10e865 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -6253,6 +6253,11 @@ class ExportController extends Controller // } + $getData = $_GET; + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广员','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-导出推广员']); + $this->exportExcel($xlsName, $xlsCell, $xlsData); @@ -6402,6 +6407,10 @@ class ExportController extends Controller } + $getData = $_GET; + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出游戏分包','url'=>U('Apply/and_lists',$getData),'menu'=>'推广员-推广员管理-推广员列表-导出游戏分包']); $this->exportExcel($xlsName, $xlsCell, $xlsData); @@ -6585,6 +6594,12 @@ class ExportController extends Controller flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + + $getData = $_GET; + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广补链','url'=>U('Mend/lists',$getData),'menu'=>'推广员-推广员管理-推广员列表-导出推广补链']); + exit(); // $data = M()->table("({$data}) as a") @@ -8229,6 +8244,12 @@ class ExportController extends Controller flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + + $getData = $_GET; + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出资源发放','url'=>U('Support/lists',$getData),'menu'=>'推广员-推广员管理-推广员列表-导出资源发放']); + exit(); } diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index ffaf82853..5197b7af0 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -148,6 +148,11 @@ class MendController extends ThinkController { } $res = $promoteService->addShiftTask($params); if($res['status']){ + + $userData = M('user','tab_')->field('account')->where(['id'=>$create['user_id']])->find(); + + addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']); + $this->success('补链成功', U('lists'), 2); }else{ $this->error($res['msg']); @@ -268,6 +273,9 @@ class MendController extends ThinkController { $id = I('id'); $status = M('ShiftTask')->where(['id' => $id,'status' => 0])->save(['status' => 2]); if ($status) { + + addOperationLog(['op_type'=>1,'key'=>$id,'op_name'=>'取消补链','url'=>U('Mend/shiftInfo',['id'=>$id]),'menu'=>'推广员-推广员管理-推广补链-取消补链']); + $this->ajaxReturn(array("status"=>1,"url"=> U('lists'))); } else { $this->ajaxReturn(array("status"=>0,"url"=> U('lists'))); diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 29f49cf76..6655838a4 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -198,6 +198,12 @@ class PromoteCompanyController extends ThinkController $this->assign('count', $count); $this->assign('promotecount', $promotecount); if($is_export){ + + $getData = $_GET; + unset($getData['export']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-导出推广公司']); + //导出 $this->display("export"); die(); @@ -242,6 +248,9 @@ class PromoteCompanyController extends ThinkController } $res = $model->add($save); if ($res) { + + addOperationLog(['op_type'=>0,'key'=>$company_name,'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-新增推广公司']); + \Think\Log::actionLog('PromoteCompany/add', 'partner', $res); $array=array( "info"=>"添加成功", @@ -307,6 +316,9 @@ class PromoteCompanyController extends ThinkController $res = $model->save($save); if ($res) { \Think\Log::actionLog('PromoteCompany/edit', 'partner', $res); + + addOperationLog(['op_type'=>1,'key'=>$_POST['company_name'],'op_name'=>'编辑推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-编辑推广公司']); + $array=array( "info"=>"修改成功", "status"=>1 @@ -368,12 +380,19 @@ class PromoteCompanyController extends ThinkController unlink("./".$v['file_path']); } } + + $companyData = M('promote_company','tab_')->field('company_name')->where(['id'=>$_REQUEST['id']])->find(); + $res = $model->delete($id); //删除对应的推广员 if ($res === false) { $this->error('删除失败'); } +// echo M()->_sql();die(); + + addOperationLog(['op_type'=>2,'key'=>$companyData['company_name'],'op_name'=>'删除推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-删除推广公司']); + $this->success('删除成功', U('lists')); } //处理上传图片 diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index ce9f467d2..4f99ee409 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -269,6 +269,9 @@ class PromoteController extends ThinkController $ba = new \Admin\Model\BusinessAffairsModel(); $ba->add_child($_REQUEST['ba_id'],$res); } */ + + addOperationLog(['op_type'=>0,'key'=>$account,'op_name'=>'新增推广员','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-新增推广员']); + session('user_auth_promote_ids', null); $this->success("添加成功", U('lists')); } else { @@ -377,6 +380,13 @@ 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'], + 'op_name'=>'编辑推广员', + 'url'=>U('Promote/edit',['id'=>$_POST['id']]), + 'menu'=>'推广员-推广员管理-推广员列表-编辑推广员']); + $this->success("修改成功", U('lists')); } else { $this->error("修改失败"); @@ -441,9 +451,14 @@ class PromoteController extends ThinkController $model=$_REQUEST['model']; unset($_REQUEST['model']); } + $a=0; $map['id']=array('in',$_REQUEST['ids']); + $set=M('promote', 'tab_')->where($map)->setField('status', $_REQUEST['status']); + +// echo M()->_sql();die(); + if ($set) { if ($_REQUEST['status']==1) { $select=M('promote', 'tab_')->where($map)->select(); @@ -451,9 +466,18 @@ class PromoteController extends ThinkController if ($count=="000000") { $a++; } + + addOperationLog(['op_type'=>1,'key'=>$value['account'],'op_name'=>'编辑审核解锁','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-编辑审核解锁']); + } $this->success('操作成功');/**,已通知'.$a.'人'*/ } else { + $select=M('promote', 'tab_')->where($map)->select(); + foreach ($select as $key => $value) { + + addOperationLog(['op_type'=>1,'key'=>$value['account'],'op_name'=>'编辑审核锁定','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-编辑审核锁定']); + + } $this->success('操作成功'); } } else { @@ -483,9 +507,20 @@ class PromoteController extends ThinkController if ($count=="000000") { $a++; } + + addOperationLog(['op_type'=>1,'key'=>$value['account'],'op_name'=>'编辑资质审核','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-编辑资质审核']); + } $this->success('操作成功');/**,已通知'.$a.'人'*/ } else { + + $select=M('promote', 'tab_')->where($map)->select(); + foreach ($select as $key => $value) { + + addOperationLog(['op_type'=>1,'key'=>$value['account'],'op_name'=>'编辑拒绝身份通过','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-编辑拒绝身份通过']); + + } + $this->success('操作成功'); } } else { @@ -1040,6 +1075,13 @@ class PromoteController extends ThinkController $res = M('config')->where(array('name'=>$config_key))->save($config); S('DB_CONFIG_DATA', null); if ($res !== false) { + + if ($val == 0) { + addOperationLog(['op_type'=>1,'key'=>getNowDate(),'op_name'=>'关闭自动审核','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-关闭自动审核']); + } else if ($val == 1) { + addOperationLog(['op_type'=>1,'key'=>getNowDate(),'op_name'=>'开启自动审核','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-开启自动审核']); + } + $this->success('操作成功'); } else { $this->error('操作失败'); @@ -1050,9 +1092,15 @@ class PromoteController extends ThinkController { if (IS_AJAX) { M()->startTrans(); + + $data = M('promote', 'tab_')->where("id={$_POST['id']} ")->find(); + $result = M('promote', 'tab_')->where("chain like '%/{$_POST['id']}/%' or id={$_POST['id']} ")->delete(); if ($result) { M()->commit(); + + addOperationLog(['op_type'=>2,'key'=>$data['account'],'op_name'=>'删除推广员','url'=>U('Promote/lists'),'menu'=>'推广员-推广员管理-推广员列表-删除推广员']); + $this->ajaxReturn(array('status'=>1,'msg'=>'删除成功')); } else { M()->rollback(); @@ -1301,6 +1349,11 @@ class PromoteController extends ThinkController } $res = M('promote_belong', 'tab_')->add($data); if ($res) { + + $promote = M('promote','tab_')->where(['id'=>$promote_id])->find(); + + addOperationLog(['op_type'=>0,'key'=>$promote['account'],'op_name'=>'工会归属申请','url'=>U('Promote/belong'),'menu'=>'推广员-推广员管理-推广公会归属管理-工会归属申请']); + $this->success("申请成功", U('belong')); } else { $this->error('申请失败'); @@ -1335,6 +1388,11 @@ class PromoteController extends ThinkController ); $res = M('promote_belong', 'tab_')->where(['id' => I('id')])->save($data); if ($res) { + + $promote = M('promote','tab_')->where(['id'=>$promote_id])->find(); + + addOperationLog(['op_type'=>1,'key'=>$promote['account'],'op_name'=>'编辑工会归属申请','url'=>U('Promote/belong_edit',['id'=>I('id')]),'menu'=>'推广员-推广员管理-推广公会归属管理-编辑工会归属申请']); + $this->success("编辑成功", U('belong')); } else { $this->error('编辑失败'); @@ -1361,6 +1419,8 @@ class PromoteController extends ThinkController 'approver_name' => getAdmin('username'), 'verify_time' => time() ]); + + if (!is_null($res) ) { if ($verify_status == 1) {//审核通过才修改推广员的归属关系 $promote_belongs = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->select(); @@ -1374,8 +1434,22 @@ class PromoteController extends ThinkController $res = M("promote", "tab_") ->where("chain like '%/{$promote_belong['promote_id']}/%' or id={$promote_belong['promote_id']} ") ->save($update); + + $promoteData = M('promote','tab_')->field('account')->where(['id'=>$promote_belong['promote_id']])->find(); + addOperationLog(['op_type'=>1,'key'=>$promoteData['account'],'op_name'=>'推广公会归属审核通过','url'=>U('Promote/belong'),'menu'=>'推广员-推广员管理-推广公会归属管理-推广公会归属审核通过']); + + } + } else if ($verify_status == 2) { + + $promote_belongs = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->select(); + foreach ($promote_belongs as $promote_belong) { + + $promoteData = M('promote','tab_')->field('account')->where(['id'=>$promote_belong['promote_id']])->find(); + addOperationLog(['op_type'=>1,'key'=>$promoteData['account'],'op_name'=>'推广公会归属审核拒绝','url'=>U('Promote/belong'),'menu'=>'推广员-推广员管理-推广公会归属管理-推广公会归属审核拒绝']); + } } + $this->success("操作成功", U('belong')); } else { $this->error('操作失败'); @@ -1488,6 +1562,11 @@ class PromoteController extends ThinkController if ($result === false) { $this->error('操作失败'); } else { + + $promoteData = M('promote','tab_')->field('account')->where(['id'=>$promoteId])->find(); + + addOperationLog(['op_type'=>1,'key'=>$promoteData['account'],'op_name'=>'资质认证','url'=>U('Promote/certification',['id'=>$promoteId]),'menu'=>'推广员-推广员管理-推广员列表-资质认证']); + $this->success('操作成功'); } } else { diff --git a/Application/Admin/Controller/SupportController.class.php b/Application/Admin/Controller/SupportController.class.php index 1a532b57a..bb45d8cec 100644 --- a/Application/Admin/Controller/SupportController.class.php +++ b/Application/Admin/Controller/SupportController.class.php @@ -88,6 +88,15 @@ class SupportController extends ThinkController { $res=M('test_resource','tab_')->where($map)->save($data); if($res!==false){ + + $resourceData = M('test_resource','tab_') + ->join('left join tab_user on tab_test_resource.user_id = tab_user.id') + ->field('user_account,tab_user.promote_account') + ->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'=>'推广员-推广员管理-推广补链-资源发放审核']); + $this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']); }else{ $this->ajaxReturn(['status'=>0,'msg'=>'操作失败!']); @@ -108,6 +117,15 @@ class SupportController extends ThinkController { $data['apply_status']=1; $res=M('test_resource','tab_')->where($map)->save($data); if($res!==false){ + + $resourceData = M('test_resource','tab_') + ->join('left join tab_user on tab_test_resource.user_id = tab_user.id') + ->field('user_account,tab_user.promote_account') + ->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'=>'推广员-推广员管理-推广补链-资源发放拒绝']); + $this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']); }else{ $this->ajaxReturn(['status'=>0,'msg'=>'操作失败!']); From 8bb790cf4e6d62f772bede5c6ad4c271f72fce7f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Feb 2020 14:28:38 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9C=88=E7=BB=93?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index c010b6ed3..b828c100e 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -7890,7 +7890,7 @@ class ExportController extends Controller $map['promote_account'] =['like','%'.$rootname.'%']; } - $xlsName = '组长月结统计'; + $xlsName = '部门长月结统计'; $xlsCell = array( array('promote_account','会长渠道'), From 665b4c8bfa286c88a5db442d779c86ae5735d31b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Feb 2020 14:46:44 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/QueryController.class.php | 12 +++++++----- Application/Admin/Model/WithdrawModel.class.php | 6 ++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 867e64a2a..51a76134f 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -336,6 +336,7 @@ class QueryController extends ThinkController $promoteId = intval(I('promote_id', 0)); $settlementType = intval(I('settlement_type', 0)); $time = I('time', ''); + if (empty($promoteId)) { $data['status'] = 0; $data['msg'] = '请选择会长账号'; @@ -363,11 +364,11 @@ class QueryController extends ThinkController $data['msg'] = '非会长账号,无法执行此操作'; $this->ajaxReturn($data); } - if ($promote['ver_status'] != 1) { - $data['status'] = 0; - $data['msg'] = '该会长未通过资质认证审核,暂时无法提现'; - $this->ajaxReturn($data); - } +// if ($promote['ver_status'] != 1) { +// $data['status'] = 0; +// $data['msg'] = '该会长未通过资质认证审核,暂时无法提现'; +// $this->ajaxReturn($data); +// } if ($promote['settlement_type'] == 1) { if (!in_array($settlementType, [1, 3])) { $data['status'] = 0; @@ -404,6 +405,7 @@ class QueryController extends ThinkController switch ($settlementType) { case 1: $result = $withdrawModel->promoteWithdrawWeeklyByPromote($promote, false, $data); + break; case 2: $result = $withdrawModel->promoteWithdrawPerMonthByPromote($promote, false, $data); diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index a591165cb..09dff66f8 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -184,6 +184,10 @@ class WithdrawModel extends Model{ ->find()['balance']; $balance = $balance ?? 0; $balance = bcdiv($balance, 100, 2); + +// addOperationLog(['op_type'=>1,'key'=>$promote['account'].$data['begin_time'].$data['end_time'].$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + + if ($balance < 100) { return -2;//余额不足 } @@ -237,6 +241,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; } From 498508b7f1451579f682a96af8c1618269112df5 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Feb 2020 14:47:07 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/QueryController.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 51a76134f..391d2101e 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -364,11 +364,11 @@ class QueryController extends ThinkController $data['msg'] = '非会长账号,无法执行此操作'; $this->ajaxReturn($data); } -// if ($promote['ver_status'] != 1) { -// $data['status'] = 0; -// $data['msg'] = '该会长未通过资质认证审核,暂时无法提现'; -// $this->ajaxReturn($data); -// } + if ($promote['ver_status'] != 1) { + $data['status'] = 0; + $data['msg'] = '该会长未通过资质认证审核,暂时无法提现'; + $this->ajaxReturn($data); + } if ($promote['settlement_type'] == 1) { if (!in_array($settlementType, [1, 3])) { $data['status'] = 0; From b7d0012d6eb5cfee7eb23f3428efd4872598fe0e Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Feb 2020 15:09:36 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=88=97=E8=A1=A8-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 1 + .../Admin/Controller/GameController.class.php | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 1877aee7c..194068888 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5537,6 +5537,7 @@ class ExportController extends Controller } + $this->exportAddOperationLog('Game/lists','游戏-游戏管理-游戏列表-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData); diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 1ff669b04..70008a091 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -225,6 +225,12 @@ class GameController extends ThinkController $this->error($game->getError()); } else { \Think\Log::actionLog('Game/add', 'Game', 1); + //操作日志 + addOperationLog(array( + "op_type"=>0, + "key"=>$_POST['game_name'], + "url"=>U("Game/lists",array("game_name"=>$_POST['game_name'])) + )); $this->success($res['id'] ? '更新成功' : '新增成功', U('lists')); } } else { @@ -282,6 +288,11 @@ class GameController extends ThinkController if (!$res) { $this->error($game->getError()); } else { + addOperationLog(array( + "op_type"=>0, + "key"=>$_POST['game_name'], + "url"=>U("Game/lists",array("game_name"=>$_POST['game_name'])) + )); $this->success($res['id'] ? '更新成功' : '新增成功', U('lists')); } } else { @@ -428,6 +439,11 @@ class GameController extends ThinkController $this->error($game->getError()); } else { \Think\Log::actionLog('Game/edit', 'Game', 1); + addOperationLog(array( + "op_type"=>1, + "key"=>$sibling ['game_name'], + "url"=>U("Game/lists",array("game_name"=>$sibling ['game_name'])) + )); $this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p')))); } @@ -563,6 +579,12 @@ class GameController extends ThinkController unlink($file_url); M('Apply', 'tab_')->where(array('game_id' => $id))->delete(); } + //操作日志 + addOperationLog(array( + "op_type"=>2, + "key"=>$gda['game_name'], + "url"=>U("Game/lists") + )); } From 31948abdf4b39306fcc12127ee1631a82410dcdd Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Feb 2020 15:27:52 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserActionLogController.class.php | 14 ++++++++++++- .../Admin/View/UserActionLog/operateLog.html | 20 ++++++++++++++----- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/UserActionLogController.class.php b/Application/Admin/Controller/UserActionLogController.class.php index ac8608df8..38ba3c12c 100644 --- a/Application/Admin/Controller/UserActionLogController.class.php +++ b/Application/Admin/Controller/UserActionLogController.class.php @@ -171,6 +171,12 @@ class UserActionLogController extends AdminController flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + + $getData = $_GET; + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出操作日志','url'=>U('UserActionLog/index',$getData),'menu'=>'站点-日志管理-操作日志-导出操作日志']); + exit(); } @@ -206,7 +212,7 @@ class UserActionLogController extends AdminController $map['admin_account'] = ['like',"%{$_REQUEST['adminname']}%"]; } - if ($_REQUEST['op_type']) { + if ($_REQUEST['op_type']||$_REQUEST['op_type']=='0') { $map['op_type'] = $_REQUEST['op_type']; } @@ -320,6 +326,12 @@ class UserActionLogController extends AdminController flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + + $getData = $_GET; + unset($getData['xlsname']); + + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出行为日志','url'=>U('UserActionLog/index',$getData),'menu'=>'站点-日志管理-操作日志-导出行为日志']); + exit(); } diff --git a/Application/Admin/View/UserActionLog/operateLog.html b/Application/Admin/View/UserActionLog/operateLog.html index cee7e0839..93395c4e1 100644 --- a/Application/Admin/View/UserActionLog/operateLog.html +++ b/Application/Admin/View/UserActionLog/operateLog.html @@ -52,14 +52,24 @@
-
-   + + + + +
+
From 19cbae833aaf68c8c7e18282d58b2a9d9464dcc4 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Feb 2020 15:28:52 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/UserActionLogController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/UserActionLogController.class.php b/Application/Admin/Controller/UserActionLogController.class.php index 38ba3c12c..0cf7de616 100644 --- a/Application/Admin/Controller/UserActionLogController.class.php +++ b/Application/Admin/Controller/UserActionLogController.class.php @@ -330,7 +330,7 @@ class UserActionLogController extends AdminController $getData = $_GET; unset($getData['xlsname']); - addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出行为日志','url'=>U('UserActionLog/index',$getData),'menu'=>'站点-日志管理-操作日志-导出行为日志']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出行为日志','url'=>U('UserActionLog/operateLog',$getData),'menu'=>'站点-日志管理-操作日志-导出行为日志']); exit();