From b87dec3aeece2b53071eec7e99e5a912011b392c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 2 Mar 2020 09:43:55 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E6=9D=83?= =?UTF-8?q?=E9=99=90=E4=BB=8E=E7=94=A8=E6=88=B7=E6=94=B9=E6=88=90=E4=BB=A5?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/MemberModel.class.php | 2 ++ Application/Common/Common/function.php | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Model/MemberModel.class.php b/Application/Admin/Model/MemberModel.class.php index 67c3675ef..9469f49c3 100644 --- a/Application/Admin/Model/MemberModel.class.php +++ b/Application/Admin/Model/MemberModel.class.php @@ -72,6 +72,7 @@ class MemberModel extends Model { $this->save($data); $adminData = getAdminData($user['uid']); + $groupId = getGameGroup($user['uid']); /* 记录登录SESSION和COOKIES */ $auth = array( @@ -86,6 +87,7 @@ class MemberModel extends Model { $expireTime = 3600; ini_set('session.gc_maxlifetime', $expireTime); ini_set('session.cookie_lifetime', $expireTime); + session('user_group_id',$groupId); session('user_auth', $auth); session('user_auth_sign', data_auth_sign($auth)); session('user_auth_expire', time()); diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index a104b86c1..6fe9fce05 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -32,6 +32,7 @@ function is_login() if (time() - intval(session('user_auth_expire')) > $expire) { // 过期正则直接去除掉session 并且返回false session('user_auth', null); session('user_auth_sign', null); + session('user_group_id', null); return 0; } else { session('user_auth_expire', time() + $expire); @@ -48,7 +49,9 @@ function is_login() function is_administrator($uid = null) { $uid = is_null($uid) ? is_login() : $uid; - return $uid && (intval($uid) === C('USER_ADMINISTRATOR')); + + return $uid && (session('user_group_id') == 1); +// (intval($uid) === C('USER_ADMINISTRATOR')); } /** @@ -1472,4 +1475,12 @@ function getPromoteCompanyName($companyId) function getGameTypes() { return M('game_type', 'tab_')->field('id, type_name')->where(['status' => 1])->select(); +} + +function getGameGroup($uid) { + + $groupId = M('auth_group_access')->field('group_id')->where(['uid'=>$uid])->find(); + + return $groupId['group_id']?$groupId['group_id']:0; + } \ No newline at end of file From 61c2519ccd52475800e4d78a21c799f1fcf0d22d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 2 Mar 2020 10:29:01 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=8D=95=E7=8B=AC=E5=88=A4=E6=96=ADadmin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index 6fe9fce05..baefa8756 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -50,7 +50,7 @@ function is_administrator($uid = null) { $uid = is_null($uid) ? is_login() : $uid; - return $uid && (session('user_group_id') == 1); + return $uid && (session('user_group_id') == 1)||(intval($uid) === C('USER_ADMINISTRATOR')); // (intval($uid) === C('USER_ADMINISTRATOR')); } From 79108b7a93d10f237261f2ec2145a01e9df5c6fb Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Mar 2020 10:35:41 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=8E=9F=E5=8C=85=E7=AE=A1=E7=90=86-?= =?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 | 2 +- .../Controller/GameSourceController.class.php | 19 +++++++++++++++++++ .../Controller/PartnerController.class.php | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index ea4c22104..5641388bb 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5727,7 +5727,7 @@ class ExportController extends Controller } - + $this->exportAddOperationLog('GameSource/lists','游戏-游戏管理-原包管理-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData); } diff --git a/Application/Admin/Controller/GameSourceController.class.php b/Application/Admin/Controller/GameSourceController.class.php index 4743a9ec1..c9ac3ce2c 100644 --- a/Application/Admin/Controller/GameSourceController.class.php +++ b/Application/Admin/Controller/GameSourceController.class.php @@ -66,6 +66,13 @@ class GameSourceController extends ThinkController $d = D('Game_source') -> where($map) -> find(); $source = A('Source', 'Event'); if (empty($d)) { + //添加原包操作日志 + $gamename = M("Game","tab_")->where("id = '{$_POST['game_id']}'")->field("game_name")->find()['game_name']; + addOperationLog(array( + "op_type"=>0, + "key"=>$gamename, + "url"=>U("GameSource/lists",array("game_name"=>$gamename)) + )); $source -> add_source(); } else { $type = $_POST['develop_id'] == 0 ? 1 : 2;//判断是添加官方游戏还是开发者游戏 @@ -120,6 +127,12 @@ class GameSourceController extends ThinkController @unlink($value['file_url']); @unlink($value['description_url']); @unlink($value['plist_url']); + //操作日志 + addOperationLog(array( + "op_type"=>2, + "key"=>$value['game_name'], + "url"=>U("GameSource/lists",array("game_name"=>$value['game_name'])) + )); } if ($Model -> where($map) -> delete()) { $this -> success('删除成功'); @@ -152,6 +165,12 @@ class GameSourceController extends ThinkController if (empty($d)) { $source->add_source(); } else { + //更新原包 + addOperationLog(array( + "op_type"=>1, + "key"=>$d['game_name'], + "url"=>U("GameSource/lists",array("game_name"=>$d['game_name'])) + )); $source->update_source($d['id'], $d['file_name']); } } else { diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 2f96fe607..29f05f74c 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -268,6 +268,12 @@ class PartnerController extends ThinkController $res = $model->add($save); if ($res) { \Think\Log::actionLog('Partner/add', 'partner', $res); + //操作日志 + addOperationLog(array( + "op_type"=>0, + "key"=>$partner, + "url"=>U("Partner/lists",array("partner"=>$partner)) + )); $this->success('保存成功', U('lists')); } else { $this->error('保存失败'); From c24b5b9e9c902f7fc051860997c97d12bd4ad993 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Mar 2020 11:31:29 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=90=88=E4=BD=9C=E6=96=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=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/PartnerController.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 29f05f74c..6a7c4a2e7 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -167,6 +167,11 @@ class PartnerController extends ThinkController $parseData = array_values($parseData); if($is_export){ $this->assign('listData', $parseData[0]); + + $GetData = $_GET; + unset($GetData['export']); + addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"游戏-游戏管理-合作方管理-导出"]); + $this->display("export"); die(); } @@ -373,6 +378,11 @@ class PartnerController extends ThinkController $this->error('保存失败'); } else { \Think\Log::actionLog('Partner/edit', 'partner', $id); + addOperationLog(array( + "op_type"=>1, + "key"=>$partner, + "url"=>U("Partner/lists",array("partner"=>$partner)) + )); $this->success('保存成功', U('lists')); } } else { @@ -416,12 +426,16 @@ class PartnerController extends ThinkController $this->error('参数异常'); } } - + @$yres = M($this->modelName, 'tab_')->field("partner")->find($id)['partner']; $res = M($this->modelName, 'tab_')->delete($id); if ($res === false) { $this->error('删除失败'); } - + addOperationLog(array( + "op_type"=>2, + "key"=>$yres, + "url"=>U("Partner/lists") + )); $this->success('删除成功', U('lists')); } From dd0f93010596b945abfe6a308348e87fdd7d4400 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Mar 2020 14:48:39 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E9=A2=84=E5=91=8A-?= =?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 | 114 ++++++++++++++++++ .../Admin/Controller/GameController.class.php | 23 ++++ .../ServerNoticeController.class.php | 5 + .../Controller/ThinkController.class.php | 27 +++++ .../Event/BatchImportExcelEvent.class.php | 6 + .../Admin/View/ServerNotice/lists.html | 2 +- 6 files changed, 176 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 5641388bb..5a56824fc 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5899,7 +5899,121 @@ class ExportController extends Controller } + $this->exportAddOperationLog('Server/lists','游戏-区服管理-区服列表-导出'); + $this->exportExcel($xlsName, $xlsCell, $xlsData); + + } + /** + * 区服预告 + * @author 鹿文学 + */ + public function server_notice_list() { + + $xlsName = $_REQUEST['xlsname']; + + if(isset($_REQUEST['show_status'])){ + $map['show_status']=$_REQUEST['show_status']; + } + if(isset($_REQUEST['server_version'])){ + $map['server_version']=$_REQUEST['server_version']; + } + if(isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])){ + $map['start_time'] = array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1)); + }elseif(isset($_REQUEST['timestart'])){ + $map['start_time']=array('EGT',strtotime($_REQUEST['timestart'])); + }elseif(isset($_REQUEST['timeend'])){ + $map['start_time']=array('ELT',strtotime($_REQUEST['timeend'])); + } + + if(isset($_REQUEST['game_name'])){ + if($_REQUEST['game_name']=='全部'){ + unset($_REQUEST['game_name']); + }else{ + $map['server_version']=$_REQUEST['server_version']; + $map['game_name']=['like', "{$_REQUEST['game_name']}%"]; + unset($_REQUEST['game_name']); + } + } + + if(isset($_REQUEST['server_name'])){ + $map['server_name']=$_REQUEST['server_name']; + unset($_REQUEST['server_name']); + } + $model = M('ServerNotice','tab_'); + + if($_REQUEST['type']==2) { + + $xlsCell = array( + array('developer_account','开发者账号'), + array('game_name','游戏名称'), + array('server_name','区服名称'), + array('server_version','运营平台'), + array('show_status','显示状态'), + array('start_time','开服时间'), + ); + + + $map['developers'] = array('NEQ',0); + + } else { + + $xlsCell = array( + array('game_name','游戏名称'), + array('server_name','区服名称'), + array('server_version','运营平台'), + array('show_status','显示状态'), + array('start_time','开服时间'), + ); + + $map['developers'] = 0; + + } + + $page = intval($_REQUEST['p']); + + $page = $page?$page:1; + + $row = $_REQUEST['row']?$_REQUEST['row']:10; + + + $data=$model + ->where($map) + ->order('id desc') + ->select(); + + $xlsData = []; + + if(is_array($data)){ + if($_REQUEST['type']==2) { + foreach($data as $k => $v) { + $v['start_time'] = date('Y-m-d H:i:s',$v['start_time']); + + $v['show_status'] = $v['show_status']==1?'已开启':'已关闭'; + $v['developer_account'] = get_developer_account($v['developers']); + $v['server_version'] = get_systems_name($v['server_version']); + + + + $xlsData[] = $v; + + } + } else { + foreach($data as $k => $v) { + + $v['start_time'] = date('Y-m-d H:i:s',$v['start_time']); + + $v['show_status'] = $v['show_status']==1?'已开启':'已关闭'; + $v['server_version'] = get_systems_name($v['server_version']); + + + $xlsData[] = $v; + + } + } + + } + $this->exportAddOperationLog('Server/lists','游戏-区服管理-区服预告-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData); } diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 70008a091..3004b3d80 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -942,6 +942,8 @@ class GameController extends ThinkController if ($_POST['warming_amount'] < $_POST['warn_frequency']) { return $this->error("预警金额频率不能大于预警金额"); } + //获取合作伙伴名称 + @$partner_name = M('Partner', 'tab_')->field('partner')->where(['id'=>$_POST['partner_id']])->find()['partner']; if ($id) { if (!M('game', 'tab_')->where(['partner_id'=>$_POST['partner_id']])->count()) { @@ -950,6 +952,11 @@ class GameController extends ThinkController $_POST['upt_time'] = time(); $_POST['operater_id'] = is_login(); $upt = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->save($_POST); + addOperationLog(array( + "op_type"=>1, + "key"=>$partner_name, + "url"=>U("Game/devide_warn_list",array("partner_id"=>$_POST['partner_id'])) + )); return $upt ? $this->success("更新成功") : $this->error("更新失败"); } else { if (M('partner_divide_warn', 'tab_')->where(['partner_id'=>$_POST['partner_id'], 'status'=>1])->find()) { @@ -961,6 +968,13 @@ class GameController extends ThinkController $_POST['upt_time'] = $_POST['create_time'] = time(); $_POST['operater_id'] = is_login(); $ins = M('partner_divide_warn', 'tab_')->add($_POST); + //操作日志 + addOperationLog(array( + "op_type"=>0, + "key"=>$partner_name, + "url"=>U("Game/devide_warn_list",array("partner_id"=>$_POST['partner_id'])), + "menu"=>"游戏-游戏管理-预付款预警管理-新增" + )); return $ins ? $this->success("新增成功") : $this->error("新增失败"); } } else { @@ -972,6 +986,15 @@ class GameController extends ThinkController $_POST['operater_id'] = is_login(); $_POST['status'] = 2; $del = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->save($_POST); + //操作日志 + @$partner_id = M('partner_divide_warn', 'tab_')->field('partner_id')->where(['id'=>$id])->find()['partner_id']; + @$partner_name = M('Partner', 'tab_')->field('partner')->where(['id'=>$partner_id])->find()['partner']; + addOperationLog(array( + "op_type"=>2, + "key"=>$partner_name, + "url"=>U("Game/devide_warn_list",array("partner_id"=>$_POST['partner_id'])), + "menu"=>"游戏-游戏管理-预付款预警管理-解除预警" + )); return $del ? $this->success("删除成功") : $this->error("删除失败"); } else { $warnInfo = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->find(); diff --git a/Application/Admin/Controller/ServerNoticeController.class.php b/Application/Admin/Controller/ServerNoticeController.class.php index e6a893d5c..530bbd28a 100644 --- a/Application/Admin/Controller/ServerNoticeController.class.php +++ b/Application/Admin/Controller/ServerNoticeController.class.php @@ -172,6 +172,11 @@ class ServerNoticeController extends ThinkController { } $this->error($msg); } + addOperationLog(array( + "op_type"=>0, + "key"=>$server[$key]['game_name']."/".$server[$key]['server_name'], + "url"=>U("ServerNotice/lists",array("server_name"=>$server[$key]['server_name'])) + )); } $server = $this->array_unset_tt($server); $res = M('ServerNotice','tab_')->addAll($server); diff --git a/Application/Admin/Controller/ThinkController.class.php b/Application/Admin/Controller/ThinkController.class.php index 2cb7b27af..a342f5726 100644 --- a/Application/Admin/Controller/ThinkController.class.php +++ b/Application/Admin/Controller/ThinkController.class.php @@ -460,7 +460,11 @@ class ThinkController extends AdminController { if(CONTROLLER_NAME == "GameType"){ $yres = $Model->where($map)->select(); } + if(CONTROLLER_NAME == "ServerNotice"){ + $yres = $Model->where($map)->select(); + } if($Model->where($map)->delete()){ + if(CONTROLLER_NAME == "GameType"){ foreach ($yres as $k => $v) { addOperationLog(array( @@ -470,6 +474,15 @@ class ThinkController extends AdminController { )); } } + if(CONTROLLER_NAME == "ServerNotice"){ + foreach ($yres as $k => $v) { + addOperationLog(array( + "op_type"=>2, + "key"=>$v['game_name']."/".$v['server_name'], + "url"=>U("ServerNotice/lists") + )); + } + } $this->success('删除成功',$url); } else { $this->error('删除失败!'); @@ -502,6 +515,13 @@ class ThinkController extends AdminController { "url"=>U("GameType/lists") )); } + if(CONTROLLER_NAME == "ServerNotice"){ + addOperationLog(array( + "op_type"=>1, + "key"=>$_POST['game_name']."/".$_POST['server_name'], + "url"=>U("ServerNotice/lists",array("server_name"=>$_POST['server_name'])) + )); + } $this->success('保存'.$model['title'].'成功!',empty($url)? U('lists?model='.$model['name']):$url); } else { $this->error($Model->getError());//,empty($url)? U('lists?model='.$model['name']):$url @@ -541,6 +561,13 @@ class ThinkController extends AdminController { "url"=>U("GameType/lists") )); } + if(CONTROLLER_NAME == "ServerNotice"){ + addOperationLog(array( + "op_type"=>0, + "key"=>$_POST['game_name']."/".$_POST['server_name'], + "url"=>U("ServerNotice/lists",array("server_name"=>$_POST['server_name'])) + )); + } $this->success('添加'.$model['title'].'成功!', empty($url)? U('lists?model='.$model['name']):$url); } else { $this->error($Model->getError()); diff --git a/Application/Admin/Event/BatchImportExcelEvent.class.php b/Application/Admin/Event/BatchImportExcelEvent.class.php index c3300e98d..c19dc4cbc 100644 --- a/Application/Admin/Event/BatchImportExcelEvent.class.php +++ b/Application/Admin/Event/BatchImportExcelEvent.class.php @@ -166,6 +166,12 @@ class BatchImportExcelEvent extends Controller{ $this->error($msg); } $key++; + //操作日志 + addOperationLog(array( + "op_type"=>0, + "key"=>get_game_name($server['A'])."/".$server['B'], + "url"=>U("ServerNotice/lists",array("server_name"=>$server['B'])) + )); } $gameModel = new \Admin\Model\GameModel(); diff --git a/Application/Admin/View/ServerNotice/lists.html b/Application/Admin/View/ServerNotice/lists.html index 453104687..4644154bb 100644 --- a/Application/Admin/View/ServerNotice/lists.html +++ b/Application/Admin/View/ServerNotice/lists.html @@ -228,7 +228,7 @@
- 导出 + 导出 {$_page|default=''}
From 7d5d6c3b3d03acab297380293c19776a11961845 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Mar 2020 15:12:23 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E7=A4=BC=E5=8C=85=E7=AE=A1=E7=90=86-?= =?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 --- .../Admin/Controller/ExportController.class.php | 3 ++- .../Admin/Controller/GiftbagController.class.php | 10 ++++++++++ .../Admin/Controller/ThinkController.class.php | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 5a56824fc..4b8d7e555 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1550,6 +1550,7 @@ class ExportController extends Controller flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } fclose($fp); + $this->exportAddOperationLog('Giftbag/record','游戏-礼包管理-领取记录-导出'); exit(); @@ -6145,7 +6146,7 @@ class ExportController extends Controller } - + $this->exportAddOperationLog('Giftbag/lists','游戏-礼包管理-礼包列表-导出'); $this->exportExcel($xlsName, $xlsCell, $xlsData); } diff --git a/Application/Admin/Controller/GiftbagController.class.php b/Application/Admin/Controller/GiftbagController.class.php index 10f854751..5d2abb4d6 100644 --- a/Application/Admin/Controller/GiftbagController.class.php +++ b/Application/Admin/Controller/GiftbagController.class.php @@ -137,6 +137,11 @@ class GiftbagController extends ThinkController { $data['server_name']=get_server_name($data['server_id']); $data['novice_num'] = count(explode(',',$data['novice'])); $Model->add($data); + addOperationLog(array( + "op_type"=>0, + "key"=>$data['game_name']."/".$data['giftbag_name'], + "url"=>U("Giftbag/lists",array("giftbag_name"=>$data['giftbag_name'])) + )); $this->success('添加礼包成功!', U('lists?model='.$model['name'])); } else { $this->error($Model->getError()); @@ -190,6 +195,11 @@ class GiftbagController extends ThinkController { $data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']); $data['novice_num'] = count(explode(',',$data['novice'])); $Model->save($data); + addOperationLog(array( + "op_type"=>1, + "key"=>$data['game_name']."/".$data['giftbag_name'], + "url"=>U("Giftbag/lists",array("giftbag_name"=>$data['giftbag_name'])) + )); $this->success('保存'.$model['title'].'成功!', U('lists',array('model'=>$model['name'],'type'=>$_REQUEST['type']))); } else { $this->error($Model->getError()); diff --git a/Application/Admin/Controller/ThinkController.class.php b/Application/Admin/Controller/ThinkController.class.php index a342f5726..9a0369cbf 100644 --- a/Application/Admin/Controller/ThinkController.class.php +++ b/Application/Admin/Controller/ThinkController.class.php @@ -463,6 +463,9 @@ class ThinkController extends AdminController { if(CONTROLLER_NAME == "ServerNotice"){ $yres = $Model->where($map)->select(); } + if(CONTROLLER_NAME == "Giftbag"){ + $yres = $Model->where($map)->select(); + } if($Model->where($map)->delete()){ if(CONTROLLER_NAME == "GameType"){ @@ -483,6 +486,15 @@ class ThinkController extends AdminController { )); } } + if(CONTROLLER_NAME == "Giftbag"){ + foreach ($yres as $k => $v) { + addOperationLog(array( + "op_type"=>2, + "key"=>$v['game_name']."/".$v['giftbag_name'], + "url"=>U("Giftbag/lists") + )); + } + } $this->success('删除成功',$url); } else { $this->error('删除失败!'); From a44b8670b09eda7c7b8a30b12ce967cd973282d8 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Mar 2020 15:32:54 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=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 --- Application/Admin/Controller/MemberController.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index e72abb880..8e3e15ede 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1042,7 +1042,12 @@ class MemberController extends ThinkController ->where($map) ->setField('real_name', $_POST['real_name']); if ($pro !== false) { - $this->userEditOperationLog($_POST['id']); + addOperationLog(array( + "op_type"=>1, + "key"=>get_user_account($_POST['id']), + "url"=>U("Member/edit",array("id"=>$_POST['id'])), + "menu"=>"用户-玩家组-玩家列表-编辑-真实姓名修改", + )); $this->ajaxReturn(array("status" => 1, "msg" => "真实姓名修改成功")); } else { $this->ajaxReturn(array("status" => 0, "msg" => "真实姓名修改失败"));