generated from root/miduo_server
拉下列表只显示主服和未合服
parent
abb363ed4a
commit
b197c99ca2
|
@ -67,7 +67,9 @@ public class MailController {
|
||||||
public String toMailPage(ModelMap map,Integer type){
|
public String toMailPage(ModelMap map,Integer type){
|
||||||
Map<Integer, String> itemNameMap = FileCacheUtils.itemNameMap;
|
Map<Integer, String> itemNameMap = FileCacheUtils.itemNameMap;
|
||||||
try {
|
try {
|
||||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
//List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||||
|
//得到所有主服和未和服信息
|
||||||
|
List<ServerInfo> allServerInfo = serverInfoDao.getServerInfoOfSlaveServer(0);
|
||||||
map.addAttribute("serverInfos",allServerInfo);
|
map.addAttribute("serverInfos",allServerInfo);
|
||||||
map.addAttribute("itemNameMap",itemNameMap);
|
map.addAttribute("itemNameMap",itemNameMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -66,7 +66,9 @@ public class ServerInfoController {
|
||||||
@RequestMapping(value = "/findServerInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
@RequestMapping(value = "/findServerInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
public String findServerInfo(ModelMap map, int quick) throws Exception {
|
public String findServerInfo(ModelMap map, int quick) throws Exception {
|
||||||
List<ServerInfoVo> serverInfoVos = new ArrayList<>();
|
List<ServerInfoVo> serverInfoVos = new ArrayList<>();
|
||||||
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
//List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
||||||
|
//查找所有主服和未合服信息
|
||||||
|
List<ServerInfo> serverInfos = serverInfoDao.getServerInfoOfSlaveServer(0);
|
||||||
for (ServerInfo serverInfo : serverInfos) {
|
for (ServerInfo serverInfo : serverInfos) {
|
||||||
if (null == serverInfo.getServer_id()) {
|
if (null == serverInfo.getServer_id()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -63,8 +63,8 @@ public class SupportController {
|
||||||
try {
|
try {
|
||||||
// 充值礼包列表
|
// 充值礼包列表
|
||||||
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
||||||
// 服务器列表
|
// 服务器列表 主服和未合服列表
|
||||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
List<ServerInfo> allServerInfo = serverInfoDao.getServerInfoOfSlaveServer(0);
|
||||||
|
|
||||||
map.addAttribute("serverInfo",allServerInfo);
|
map.addAttribute("serverInfo",allServerInfo);
|
||||||
map.addAttribute("rechargeMap",rechargeMap);
|
map.addAttribute("rechargeMap",rechargeMap);
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Map;
|
||||||
public interface ServerInfoDao {
|
public interface ServerInfoDao {
|
||||||
List<ServerInfo> getAllServerInfo() throws Exception;
|
List<ServerInfo> getAllServerInfo() throws Exception;
|
||||||
List<ServerInfo> getServerInfoOfSubChannel(String subChannel) throws Exception;
|
List<ServerInfo> getServerInfoOfSubChannel(String subChannel) throws Exception;
|
||||||
|
List<ServerInfo> getServerInfoOfSlaveServer(int isSlaveServer) throws Exception;
|
||||||
Map<String,ServerInfo> getAllServerMap() throws Exception;
|
Map<String,ServerInfo> getAllServerMap() throws Exception;
|
||||||
List<gameName> getAllGameInfo() throws Exception;
|
List<gameName> getAllGameInfo() throws Exception;
|
||||||
ServerInfo getServerInfo(String id) throws Exception;
|
ServerInfo getServerInfo(String id) throws Exception;
|
||||||
|
|
|
@ -43,6 +43,16 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
|
||||||
return serverInfos.stream().sorted().collect(Collectors.toList());
|
return serverInfos.stream().sorted().collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ServerInfo> getServerInfoOfSlaveServer(int isSlaveServer) throws Exception{
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||||
|
Query query = new Query(Criteria.where("isSlave").is(isSlaveServer));
|
||||||
|
List<ServerInfo> serverInfos = mongoTemplate.find(query, ServerInfo.class);
|
||||||
|
return serverInfos.stream().sorted().collect(Collectors.toList());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, ServerInfo> getAllServerMap() throws Exception {
|
public Map<String, ServerInfo> getAllServerMap() throws Exception {
|
||||||
List<ServerInfo> serverInfos = getAllServerInfo();
|
List<ServerInfo> serverInfos = getAllServerInfo();
|
||||||
|
|
Loading…
Reference in New Issue