generated from root/miduo_server
小bug修改
parent
dbdc0f6a01
commit
fab8415e2d
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
// 批量修改服务器状态
|
||||
function updateCrossId() {
|
||||
var serverId = serverInfos.getValue('valueStr');
|
||||
var crossId = $("#crossId").val().toString();
|
||||
var crossId = $("#crossId").val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue