generated from root/miduo_server
添加新状态
parent
f7f04fcbd0
commit
ba380b6bf7
|
|
@ -287,11 +287,14 @@ public class ServerInfoController {
|
|||
String serverId = request.getParameter("serverId");
|
||||
String[] serverIds = serverId.split(",");
|
||||
|
||||
String status = request.getParameter("status");
|
||||
// 跨服id
|
||||
String crossIdStr = request.getParameter("crossId");
|
||||
String patch = "[-]?[0-9]+?";
|
||||
boolean matches = patch.matches(crossIdStr);
|
||||
|
||||
// 状态
|
||||
String status = request.getParameter("status");
|
||||
|
||||
Map<String, ServerInfo> allServerMap = serverInfoDao.getAllServerMap();
|
||||
for (String id : serverIds) {
|
||||
ServerInfo info = allServerMap.get(id);
|
||||
|
|
@ -304,8 +307,14 @@ public class ServerInfoController {
|
|||
LoginController.addQueue("服务器未处于《未运营》状态,无法修改,服务器id:"+id);
|
||||
continue;
|
||||
}
|
||||
// 修改服务器信息
|
||||
serverInfoDao.updateServerInfo(id, status);
|
||||
// -5表示维护服务器并踢全部玩家下线,一般用于线上停服更新
|
||||
if (status.equals("-5")){
|
||||
serverInfoDao.updateServerInfo(id, "1");
|
||||
GMHandler.sendGm(id,"kick 0");
|
||||
}else {
|
||||
// 修改服务器信息
|
||||
serverInfoDao.updateServerInfo(id, status);
|
||||
}
|
||||
// 修改跨服id,空或者非整数不做修改
|
||||
if (matches){
|
||||
updateGmGroupId(id,Integer.parseInt(crossIdStr));
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
</select>
|
||||
<select name="status2" class="input-text" id="status2" title="服务器状态,请选择不会进行修改" style="width: 80px;"><!--下拉列表-->
|
||||
<option value="-999">请选择</option>
|
||||
<option value="-5">维护并踢全部玩家下线</option>
|
||||
<option value="0">关闭</option>
|
||||
<option value="1">维护</option>
|
||||
<option value="2">流畅</option>
|
||||
|
|
|
|||
Loading…
Reference in New Issue