原包管理-操作日志

master
chenzhi 5 years ago
parent 61c2519ccd
commit 79108b7a93

@ -5727,7 +5727,7 @@ class ExportController extends Controller
}
$this->exportAddOperationLog('GameSource/lists','游戏-游戏管理-原包管理-导出');
$this->exportExcel($xlsName, $xlsCell, $xlsData);
}

@ -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 {

@ -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('保存失败');

Loading…
Cancel
Save