礼包管理-操作日志

master
chenzhi 5 years ago
parent dd0f930105
commit 7d5d6c3b3d

@ -1550,6 +1550,7 @@ class ExportController extends Controller
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
} }
fclose($fp); fclose($fp);
$this->exportAddOperationLog('Giftbag/record','游戏-礼包管理-领取记录-导出');
exit(); exit();
@ -6145,7 +6146,7 @@ class ExportController extends Controller
} }
$this->exportAddOperationLog('Giftbag/lists','游戏-礼包管理-礼包列表-导出');
$this->exportExcel($xlsName, $xlsCell, $xlsData); $this->exportExcel($xlsName, $xlsCell, $xlsData);
} }

@ -137,6 +137,11 @@ class GiftbagController extends ThinkController {
$data['server_name']=get_server_name($data['server_id']); $data['server_name']=get_server_name($data['server_id']);
$data['novice_num'] = count(explode(',',$data['novice'])); $data['novice_num'] = count(explode(',',$data['novice']));
$Model->add($data); $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'])); $this->success('添加礼包成功!', U('lists?model='.$model['name']));
} else { } else {
$this->error($Model->getError()); $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'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']);
$data['novice_num'] = count(explode(',',$data['novice'])); $data['novice_num'] = count(explode(',',$data['novice']));
$Model->save($data); $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']))); $this->success('保存'.$model['title'].'成功!', U('lists',array('model'=>$model['name'],'type'=>$_REQUEST['type'])));
} else { } else {
$this->error($Model->getError()); $this->error($Model->getError());

@ -463,6 +463,9 @@ class ThinkController extends AdminController {
if(CONTROLLER_NAME == "ServerNotice"){ if(CONTROLLER_NAME == "ServerNotice"){
$yres = $Model->where($map)->select(); $yres = $Model->where($map)->select();
} }
if(CONTROLLER_NAME == "Giftbag"){
$yres = $Model->where($map)->select();
}
if($Model->where($map)->delete()){ if($Model->where($map)->delete()){
if(CONTROLLER_NAME == "GameType"){ 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); $this->success('删除成功',$url);
} else { } else {
$this->error('删除失败!'); $this->error('删除失败!');

Loading…
Cancel
Save