服务器状态去除准备中,已无用

master
duhui 2021-08-27 10:47:48 +08:00
parent 24054c5e6f
commit 82dcd7fe05
4 changed files with 1 additions and 5 deletions

View File

@ -149,7 +149,7 @@ public class ServerInfoController {
String[] serverIds = serverId.split(","); String[] serverIds = serverId.split(",");
for (String str:serverIds){ for (String str:serverIds){
ServerInfo info = serverInfoDao.getServerinfo(str); ServerInfo info = serverInfoDao.getServerinfo(str);
if (info != null && "-2".equals(info.getStatus())){ if (info != null && ServerStatusEnum.NOT_OPERATE.getId() == Integer.parseInt(info.getStatus())){
return 0; return 0;
} }
} }

View File

@ -12,7 +12,6 @@ import java.util.TreeMap;
*/ */
public enum ServerStatusEnum { public enum ServerStatusEnum {
// 类型 // 类型
PREPARE(-1,"准备中"),
NOT_OPERATE(-2,"未运营"), NOT_OPERATE(-2,"未运营"),
CLOSE(0,"关闭"), CLOSE(0,"关闭"),
MAINTAIN(1,"维护"), MAINTAIN(1,"维护"),

View File

@ -45,7 +45,6 @@
th:text="${server.server_id}+'-'+${server.name}"></option> th:text="${server.server_id}+'-'+${server.name}"></option>
</select> </select>
<select name="status2" class="input-text" id="status2" style="width: 200px;"><!--下拉列表--> <select name="status2" class="input-text" id="status2" style="width: 200px;"><!--下拉列表-->
<option value="-1">服务器准备中</option>
<option value="0">关闭</option> <option value="0">关闭</option>
<option value="1">维护</option> <option value="1">维护</option>
<option value="2">流畅</option> <option value="2">流畅</option>
@ -79,7 +78,6 @@
<td th:text="${obj.open_time}" style="text-align: center;"></td> <td th:text="${obj.open_time}" style="text-align: center;"></td>
<th th:switch="${obj.status}" style="text-align: center;"> <th th:switch="${obj.status}" style="text-align: center;">
<span th:case="-2" class="Hui-iconfont" style="color: #8b0000;">未运营 </span> <span th:case="-2" class="Hui-iconfont" style="color: #8b0000;">未运营 </span>
<span th:case="-1" class="label label-defaunt radius">服务器准备中</span>
<span th:case="0" class="label label-defaunt radius">已关闭</span> <span th:case="0" class="label label-defaunt radius">已关闭</span>
<span th:case="1" class="Hui-iconfont" style="color: #2f332a">维护</span> <span th:case="1" class="Hui-iconfont" style="color: #2f332a">维护</span>
<span th:case="2" class="Hui-iconfont" style="color: #00B83F">流畅</span> <span th:case="2" class="Hui-iconfont" style="color: #00B83F">流畅</span>

View File

@ -65,7 +65,6 @@
<div class="formControls col-xs-8 col-sm-9"> <div class="formControls col-xs-8 col-sm-9">
<select th:name="status" class="input-text" id="status"><!--下拉列表--> <select th:name="status" class="input-text" id="status"><!--下拉列表-->
<div th:switch="*{status}"> <div th:switch="*{status}">
<option th:value="-1">服务器准备中</option>
<option th:value="0">关闭</option> <option th:value="0">关闭</option>
<option th:value="1">维护</option> <option th:value="1">维护</option>
<option th:value="2">流畅</option> <option th:value="2">流畅</option>