Compare commits

...

2 Commits

Author SHA1 Message Date
xuexinpeng a243121650 Merge branch 'master' into jieling 2023-12-19 17:00:24 +08:00
xuexinpeng b197c99ca2 拉下列表只显示主服和未合服 2023-12-19 16:35:19 +08:00
5 changed files with 19 additions and 4 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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();