generated from root/miduo_server
Compare commits
2 Commits
13f1ab34ea
...
a243121650
Author | SHA1 | Date |
---|---|---|
|
a243121650 | |
|
b197c99ca2 |
|
@ -67,7 +67,9 @@ public class MailController {
|
|||
public String toMailPage(ModelMap map,Integer type){
|
||||
Map<Integer, String> itemNameMap = FileCacheUtils.itemNameMap;
|
||||
try {
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||
//List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||
//得到所有主服和未和服信息
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getServerInfoOfSlaveServer(0);
|
||||
map.addAttribute("serverInfos",allServerInfo);
|
||||
map.addAttribute("itemNameMap",itemNameMap);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -66,7 +66,9 @@ public class ServerInfoController {
|
|||
@RequestMapping(value = "/findServerInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String findServerInfo(ModelMap map, int quick) throws Exception {
|
||||
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) {
|
||||
if (null == serverInfo.getServer_id()) {
|
||||
continue;
|
||||
|
|
|
@ -63,8 +63,8 @@ public class SupportController {
|
|||
try {
|
||||
// 充值礼包列表
|
||||
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
||||
// 服务器列表
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||
// 服务器列表 主服和未合服列表
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getServerInfoOfSlaveServer(0);
|
||||
|
||||
map.addAttribute("serverInfo",allServerInfo);
|
||||
map.addAttribute("rechargeMap",rechargeMap);
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Map;
|
|||
public interface ServerInfoDao {
|
||||
List<ServerInfo> getAllServerInfo() throws Exception;
|
||||
List<ServerInfo> getServerInfoOfSubChannel(String subChannel) throws Exception;
|
||||
List<ServerInfo> getServerInfoOfSlaveServer(int isSlaveServer) throws Exception;
|
||||
Map<String,ServerInfo> getAllServerMap() throws Exception;
|
||||
List<gameName> getAllGameInfo() throws Exception;
|
||||
ServerInfo getServerInfo(String id) throws Exception;
|
||||
|
|
|
@ -43,6 +43,16 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
|
|||
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
|
||||
public Map<String, ServerInfo> getAllServerMap() throws Exception {
|
||||
List<ServerInfo> serverInfos = getAllServerInfo();
|
||||
|
|
Loading…
Reference in New Issue