diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 40a5dfd66..91d90457b 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2201,7 +2201,7 @@ function a_array_unique($array){ /** * 操作日志 * array( - * op_type=>操作类型 1:编辑 2:删除 3:下载, + * op_type=>操作类型 0:新增,1:编辑 2:删除 3:下载, * op_name=>操作说明 例如:编辑,删除,锁定等, * url=>需要跳转的url 添加去列表加唯一id,编辑直接去编辑页面,下载可以重新下载(新开页面), * key=>关键词:用户的账号,游戏的名词等, @@ -2217,7 +2217,7 @@ function a_array_unique($array){ } } if(!array_key_exists("op_name",$options)){ - $options['op_name'] = ($options['op_type'] == 1 ? "编辑" : ($options['op_type'] == 2 ? "删除" :"导出")); + $options['op_name'] = ($options['op_type'] == 1 ? "编辑" : ($options['op_type'] == 2 ? "删除" :($options['op_type'] == 3 ? "导出" :"新增"))); } //获取ip $addarray = [ diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 5d7359bb6..e72abb880 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1668,7 +1668,7 @@ class MemberController extends ThinkController if (!empty($tag)) { $map['tag'] = $tag; } - $list = M('device_bans', 'tab_')->where($map)->page($p, $row)->select(); + $list = M('device_bans', 'tab_')->where($map)->page($p, $row)->order("create_time desc")->select(); $count = M('device_bans', 'tab_')->where($map)->count(); if (!empty($list)) { foreach ($list as &$item) { @@ -1721,12 +1721,24 @@ class MemberController extends ThinkController if ($item) { return $this->error("该禁用已经存在(ID:{$item['id']})"); } - M('device_bans', 'tab_')->add(['type' => $type, 'tag' => $tag, 'create_time' => time(), 'operator_id' => is_login()]); + $res = M('device_bans', 'tab_')->add(['type' => $type, 'tag' => $tag, 'create_time' => time(), 'operator_id' => is_login()]); + addOperationLog(array( + "op_type"=>0, + "key"=>$res, + "menu"=>"用户-玩家组-分控列表-新增", + "url"=>U("Member/device_bans_list") + )); } return $this->success("新增成功", U('Member/device_bans_list')); } else { M('device_bans', 'tab_')->where(['id' => $id])->delete(); + addOperationLog(array( + "op_type"=>2, + "key"=>$id, + "menu"=>"用户-玩家组-分控列表-解除", + "url"=>U("Member/device_bans_list") + )); return $this->success("解除成功"); } }