小bug修改

master
duhui 2023-01-25 21:21:38 +08:00
parent dbdc0f6a01
commit fab8415e2d
3 changed files with 9 additions and 2 deletions

View File

@ -14,9 +14,11 @@ import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Component
public class ServerInfoDaoImpl implements ServerInfoDao {
@ -29,7 +31,8 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
@Override
public List<ServerInfo> getAllServerInfo() throws Exception {
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
return mongoTemplate.find(new Query(), ServerInfo.class);
List<ServerInfo> serverInfos = mongoTemplate.find(new Query(), ServerInfo.class);
return serverInfos.stream().sorted().collect(Collectors.toList());
}
@Override

View File

@ -125,6 +125,10 @@ public class ServerInfo implements Comparable,Cloneable {
this.server_id = server_id;
}
public int getServerId(){
return Integer.parseInt(server_id);
}
public String getChannel() {
return channel;
}

View File

@ -101,7 +101,7 @@
// 批量修改服务器状态
function updateCrossId() {
var serverId = serverInfos.getValue('valueStr');
var crossId = $("#crossId").val().toString();
var crossId = $("#crossId").val();
$.ajax({
type: "POST",
data: {