generated from root/miduo_server
修改2
parent
dd05dfe07e
commit
bba5494d83
|
@ -316,7 +316,9 @@ public class ServerInfoController {
|
|||
String[] serverIds = serverId.split(",");
|
||||
|
||||
String status = request.getParameter("status");
|
||||
int crossId = Integer.parseInt(request.getParameter("crossId"));
|
||||
String crossIdStr = request.getParameter("crossId");
|
||||
String patch = "[-]?[0-9]+?";
|
||||
boolean matches = patch.matches(crossIdStr);
|
||||
|
||||
Map<String, ServerInfo> allServerMap = serverInfoDao.getAllServerMap();
|
||||
for (String id : serverIds) {
|
||||
|
@ -333,9 +335,9 @@ public class ServerInfoController {
|
|||
}
|
||||
// 修改服务器信息
|
||||
serverInfoDao.updateServerInfo(id, status);
|
||||
// 修改跨服id,小于0不做修改
|
||||
if (crossId > 0){
|
||||
updateGmGroupId(id,crossId);
|
||||
// 修改跨服id,空或者非整数不做修改
|
||||
if (matches){
|
||||
updateGmGroupId(id,Integer.parseInt(crossIdStr));
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<option th:each="server:${serverInfos}" th:if="${server.getStatus() != '-2'}" th:value="${server.getServer_id()}"
|
||||
th:text="${server.getServer_id()}+'-'+${server.getName()}"></option>
|
||||
</select>
|
||||
<select name="status2" class="input-text" id="status2" title="服务器状态" style="width: 80px;"><!--下拉列表-->
|
||||
<select name="status2" class="input-text" id="status2" title="服务器状态,请选择不会进行修改" style="width: 80px;"><!--下拉列表-->
|
||||
<option value="-999">请选择</option>
|
||||
<option value="0">关闭</option>
|
||||
<option value="1">维护</option>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<option value="3">拥挤</option>
|
||||
<option value="4">爆满</option>
|
||||
</select>
|
||||
<input type="number" id="crossId2" style="width: 55px;" title="跨服id" value="0" class="input-text"/>
|
||||
<input type="text" id="crossId2" style="width: 55px;" title="跨服id,不填写或者中文不会进行修改" class="input-text"/>
|
||||
<button class="btn btn-primary" type="button" onclick="updateServers()">批量修改</button>
|
||||
<div style="float: right">
|
||||
刷新服务器缓存:【<a href="/findServerInfoNotCache">刷新</a>】
|
||||
|
@ -193,7 +193,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 删除服务器列表
|
||||
// 重启服务器列表
|
||||
function restartServer(obj) {
|
||||
var serverId = $(obj).attr("id");
|
||||
var msg = "请问是否要重启该服务器:{"+serverId+"},\n\n请确认!";
|
||||
|
|
Loading…
Reference in New Issue