generated from root/miduo_server
20220713,gm优化更新
parent
f910f5e390
commit
fc644c4dc8
|
@ -328,6 +328,49 @@ public class ServerInfoController {
|
|||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改服务器状态
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/toUpdateServerList", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String toUpdateServerList(ModelMap map) throws Exception {
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||
map.addAttribute("serverInfo", allServerInfo);
|
||||
return "serverListEdit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改服务器状态
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/updateServerListCrossId", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public @ResponseBody int updateServerListCrossId(HttpServletRequest request) throws Exception {
|
||||
// f服务器列表
|
||||
String serverId = request.getParameter("serverId");
|
||||
String[] serverIds = serverId.split(",");
|
||||
|
||||
// 跨服id
|
||||
int crossId = Integer.parseInt(request.getParameter("crossId"));
|
||||
|
||||
Map<String, ServerInfo> allServerMap = serverInfoDao.getAllServerMap();
|
||||
for (String id : serverIds) {
|
||||
ServerInfo info = allServerMap.get(id);
|
||||
if (info == null){
|
||||
LoginController.addQueue("无法在数据库内找到对应的服务器id,操作失败,服务器id:"+id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (info.getStatusInt() == ServerStatusEnum.NOT_OPERATE.getId()){
|
||||
updateGameGroupId(id,crossId);
|
||||
}else {
|
||||
updateGmGroupId(id,crossId);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清库
|
||||
|
|
|
@ -24,6 +24,7 @@ public enum PowersEnum {
|
|||
TRANSFER_SERVER_PERMISSIONS(208,"迁服",200,1,"/html/transferServer.html"),
|
||||
RESTART_SERVER_PERMISSIONS(209,"权限:重启服务器",200,0,""),
|
||||
CLEANUP_SERVER_PERMISSIONS(210,"权限:清库",200,0,""),
|
||||
SERVER_LIST_UPDATE(211,"批量修改服务器",200,1,"toUpdateServerList"),
|
||||
|
||||
// 序列号管理300-399
|
||||
SERIAL_NUMBER_MANAGER(300,"序列号管理",300,1,""),
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
<option value="3">拥挤</option>
|
||||
<option value="4">爆满</option>
|
||||
</select>
|
||||
<input type="number" id="crossId2" style="width: 55px;" value="-1" title="跨服id,负数不做修改" class="input-text"/>
|
||||
<button class="btn btn-primary" type="button" onclick="updateServers()">批量修改</button>
|
||||
<!-- <div style="float: right">-->
|
||||
<!-- 刷新服务器缓存:【<a href="/findServerInfoNotCache">刷新</a>】-->
|
||||
|
@ -65,18 +64,18 @@
|
|||
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||
<thead>
|
||||
<tr class="text-c" >
|
||||
<th width="150">server_id</th>
|
||||
<th width="250">ip:port</th>
|
||||
<th width="90">server_id</th>
|
||||
<th width="130">ip:port</th>
|
||||
<th width="100">开启类型</th>
|
||||
<th width="200">服务器名字</th>
|
||||
<th width="100">渠道</th>
|
||||
<th width="100">core</th>
|
||||
<th width="200">开服时间</th>
|
||||
<th width="100">跨服分组id(当前)</th>
|
||||
<th width="120">服务器状态</th>
|
||||
<th width="100">新服推荐</th>
|
||||
<th width="100">版本号</th>
|
||||
<th width="200">上次重启时间</th>
|
||||
<th width="110">服务器名字</th>
|
||||
<th width="60">渠道</th>
|
||||
<th width="70">core</th>
|
||||
<th width="150">开服时间</th>
|
||||
<th width="100">跨服id(当前)</th>
|
||||
<th width="100">服务器状态</th>
|
||||
<th width="70">新服推荐</th>
|
||||
<th width="70">版本号</th>
|
||||
<th width="150">上次重启时间</th>
|
||||
<!-- <th width="200">游戏端口状态(160*)</th>-->
|
||||
<!-- <th width="200">支付端口状态(180*)</th>-->
|
||||
<th width="200">操作</th>
|
||||
|
@ -258,13 +257,11 @@
|
|||
function updateServers() {
|
||||
var serverId = $("#serverId").val().toString();
|
||||
var status2 = $("#status2").val().toString();
|
||||
var crossId2 = $("#crossId2").val().toString();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
"serverId" : serverId,
|
||||
"status": status2,
|
||||
"crossId" : crossId2
|
||||
},
|
||||
url: "/serverListEdit",
|
||||
success: function (data) {
|
||||
|
|
|
@ -0,0 +1,155 @@
|
|||
<!--_meta 作为公共模版分离出去-->
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
||||
<link rel="Bookmark" href="../favicon.ico" />
|
||||
<link rel="Shortcut Icon" href="../favicon.ico" />
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="../static/lib/html5shiv.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
|
||||
<!-- 多选框 -->
|
||||
<link href="../static/searchableSelect/css/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="https://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
|
||||
<link href="../static/bootstrap/css/bootstrap-select.css" rel="stylesheet">
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
<![endif]-->
|
||||
<!--/meta 作为公共模版分离出去-->
|
||||
<title>基本设置</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
|
||||
<span class="c-gray en">></span>
|
||||
服务器管理
|
||||
<span class="c-gray en">></span>
|
||||
批量修改服务器信息
|
||||
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a>
|
||||
</nav>
|
||||
<div class="page-container">
|
||||
<h2 style="text-align: center"><span style="color:red;">批量修改服务器信息</span></h2>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
区服id:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9" style="margin: -3px 0 0 -150px;">
|
||||
<!--多选服务器-->
|
||||
<select name="serverId" class="selectpicker" id="serverId" multiple
|
||||
data-live-search="true"
|
||||
data-width="300px"
|
||||
data-actions-box="true">
|
||||
<option th:each="server:${serverInfo}" th:value="${server.getServer_id()}"
|
||||
th:text="${server.getServer_id()}+'-'+${server.getName()}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row cl" style="margin-top: 20px;">
|
||||
<label class="form-label col-xs-1" style="margin-left: 7px" title="未运营状态的服务器可以立即修改,其他状态下服务器会在下周一零点生效">
|
||||
跨服id修改:
|
||||
</label>
|
||||
<input type="number" id="crossId" style="width: 150px;" value="0" title="" class="input-text"/>
|
||||
<button class="btn btn-primary radius" style="font-size: 15px; margin-left: 10px;" onclick="updateCrossId()"> 提交
|
||||
</button>
|
||||
</div>
|
||||
<iframe name='sendGM' id="sendGM" style='display: none'></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--_footer 作为公共模版分离出去-->
|
||||
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/layer/2.4/layer.js"></script>
|
||||
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||
|
||||
<!-- 多选框 -->
|
||||
<script type="text/javascript" src="../static/searchableSelect/js/jquery.searchableSelect.js"></script>
|
||||
<script src="../static/bootstrap/js/bootstrap-select.js"></script>
|
||||
|
||||
<!--请在下方写此页面业务相关的脚本-->
|
||||
<script type="text/javascript" src="../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
// 模糊搜素
|
||||
$('#InputsWrapper select').searchableSelect();
|
||||
});
|
||||
|
||||
// 下拉框多选
|
||||
init();
|
||||
function init() {
|
||||
initInfo();
|
||||
}
|
||||
function initInfo() {
|
||||
$(window).on('load', function () {
|
||||
|
||||
$('.selectpicker').selectpicker({
|
||||
// 'selectedText': 'cat',
|
||||
noneSelectedText: '请选择',
|
||||
noneResultsText: '没有找到匹配的组织 {0}'
|
||||
});
|
||||
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
|
||||
// 检测浏览器的方法由用户自行决定
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
||||
$('.selectpicker').selectpicker('mobile');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 批量修改服务器状态
|
||||
function updateCrossId() {
|
||||
var serverId = $("#serverId").val().toString();
|
||||
var crossId = $("#crossId").val().toString();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
"serverId" : serverId,
|
||||
"crossId" : crossId
|
||||
},
|
||||
url: "/updateServerListCrossId",
|
||||
success: function (data) {
|
||||
if (data === 1) {
|
||||
alert("操作成功");
|
||||
}else {
|
||||
alert("操作失败");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// 获得上面的复选框
|
||||
var $selectAll = $("#selectAll");
|
||||
// alert($selectAll.prop("checked")); // 返回undefined未定义
|
||||
$selectAll.click(function() {
|
||||
// alert($selectAll.prop("checked"));
|
||||
if ($selectAll.prop("checked") == true) {
|
||||
// 上面的复选框已被选中
|
||||
$(":checkbox[name='serverId']").prop("checked", true);
|
||||
} else {
|
||||
// 上面的复选框没被选中
|
||||
$(":checkbox[name='serverId']").prop("checked", false);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -27,7 +27,15 @@
|
|||
</div>
|
||||
<div style="margin-left: 20px;font-size: 18px">
|
||||
<div>
|
||||
<h2 style="color: red" class="f-36">更新日志[2022-7-5]</h2>
|
||||
<h2 style="color: red" class="f-36">更新日志[2022-7-13]</h2>
|
||||
<p class="f-14" style="line-height:32px;">
|
||||
1、“服务器管理”标签下添加“批量修改服务器信息”页面,用来做服务器的批量修改,包含全部状态服务器<br>
|
||||
2、“服务器信息”界面的 批量修改跨服id输入框 移动到 “批量修改服务器信息” 界面下,修改服务器状态选择框还在原位<br>
|
||||
3、目前可在 “批量修改服务器信息” 页面下进行复数服务器的跨服id修改,不管什么状态都可以选中一起修改,修改逻辑未变,详情可将鼠标移动到改页面的“跨服id修改”文字上即可查看<br>
|
||||
4、优化显示“服务器信息”页面中每一列的宽度<br>
|
||||
</p>
|
||||
|
||||
<h2 style="color: red" class="f-18">更新日志[2022-7-5]</h2>
|
||||
<p class="f-14" style="line-height:32px;">
|
||||
1、服务器清库步骤整理:<br>
|
||||
(1)确认服务器状态处于“未运营”状态下<br>
|
||||
|
|
Loading…
Reference in New Issue