From 7d5d6c3b3d03acab297380293c19776a11961845 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Mar 2020 15:12:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BC=E5=8C=85=E7=AE=A1=E7=90=86-=E6=93=8D?= =?UTF-8?q?=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('删除失败!');