|
|
@@ -111,7 +111,7 @@ func (this *ServerListNode) GetServerById(c *gin.Context, nodeId string) *Server
|
|
|
|
|
|
var retServerNode ServerNode
|
|
|
for idx := 0; idx < len(this.serverSpeList); idx++ {
|
|
|
- if this.serverSpeList[idx].ServerId == serverId {
|
|
|
+ if (this.serverSpeList[idx].ServerId == serverId) || (c.DefaultQuery("buildTag", "") == "IOS_1") {
|
|
|
if bWhite {
|
|
|
retServerNode = *this.serverSpeList[idx]
|
|
|
//白名单玩家状态修改
|
|
|
@@ -122,7 +122,7 @@ func (this *ServerListNode) GetServerById(c *gin.Context, nodeId string) *Server
|
|
|
} else {
|
|
|
retServerNode = *this.serverSpeList[idx]
|
|
|
}
|
|
|
- break
|
|
|
+ return &retServerNode
|
|
|
}
|
|
|
}
|
|
|
if serverNode, ok := this.serverMapList[serverId]; ok {
|
|
|
@@ -220,6 +220,7 @@ func (this *ServerListNode) GetServerList(c *gin.Context, pageIdStr string) inte
|
|
|
resver := c.DefaultQuery("resver", "") ///default ""
|
|
|
openId := c.DefaultQuery("openid", "") ///default ""
|
|
|
platform := c.DefaultQuery("platform", "") ///default ""
|
|
|
+ param := c.DefaultQuery("buildTag", "") ///default ""审核服标志
|
|
|
openId = ConvertPlatform(openId, platform)
|
|
|
tmpConfig := GetServiceConfig()
|
|
|
bBlack := tmpConfig.IsBlackList(openId, ip, resver)
|
|
|
@@ -240,7 +241,7 @@ func (this *ServerListNode) GetServerList(c *gin.Context, pageIdStr string) inte
|
|
|
bBlockPlatform := tmpConfig.IsPlatformBlackList(subplatform)
|
|
|
bWhite := tmpConfig.IsWhiteList(openId, ip, resver)
|
|
|
|
|
|
- serverNum := this.GetServerListNum(bWhite)
|
|
|
+ serverNum := this.GetServerListNum(bWhite, param)
|
|
|
if pageId <= 0 {
|
|
|
pageId = serverNum / 10
|
|
|
if serverNum%10 != 0 {
|
|
|
@@ -256,35 +257,54 @@ func (this *ServerListNode) GetServerList(c *gin.Context, pageIdStr string) inte
|
|
|
if eIdx > serverNum {
|
|
|
eIdx = serverNum
|
|
|
}
|
|
|
-
|
|
|
- allServerSt.ServerNum = serverNum
|
|
|
- for idx := sIdx; idx < eIdx; idx++ {
|
|
|
- tmpNode := *this.serverNormalList[idx]
|
|
|
- if bWhite {
|
|
|
- //白名单玩家状态修改
|
|
|
- //5维护 6待测试
|
|
|
- if tmpNode.State != 6 {
|
|
|
- tmpNode.State = 0
|
|
|
+ if param == "IOS_1" {
|
|
|
+ allServerSt.ServerNum = serverNum
|
|
|
+ for idx := 0; idx < len(this.serverSpeList); idx++ {
|
|
|
+ tmpNode := *this.serverSpeList[idx]
|
|
|
+ allServerSt.ServerList = append(allServerSt.ServerList, tmpNode)
|
|
|
+ if tmpNode.ServerId > allServerSt.MaxServerId {
|
|
|
+ allServerSt.MaxServerId = tmpNode.ServerId
|
|
|
}
|
|
|
- } else if bBlockPlatform {
|
|
|
- tmpNode.State = 5
|
|
|
- }
|
|
|
- if !bWhite && tmpNode.Invisible > 0 {
|
|
|
- continue
|
|
|
}
|
|
|
- allServerSt.ServerList = append(allServerSt.ServerList, tmpNode)
|
|
|
- if tmpNode.ServerId > allServerSt.MaxServerId {
|
|
|
- allServerSt.MaxServerId = tmpNode.ServerId
|
|
|
+ allServerSt.MaxServerId = serverNum
|
|
|
+ } else {
|
|
|
+ allServerSt.ServerNum = serverNum
|
|
|
+ for idx := sIdx; idx < eIdx; idx++ {
|
|
|
+ tmpNode := *this.serverNormalList[idx]
|
|
|
+ if bWhite {
|
|
|
+ //白名单玩家状态修改
|
|
|
+ //5维护 6待测试
|
|
|
+ if tmpNode.State != 6 {
|
|
|
+ tmpNode.State = 0
|
|
|
+ }
|
|
|
+ } else if bBlockPlatform {
|
|
|
+ tmpNode.State = 5
|
|
|
+ }
|
|
|
+ if !bWhite && tmpNode.Invisible > 0 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ allServerSt.ServerList = append(allServerSt.ServerList, tmpNode)
|
|
|
+ if tmpNode.ServerId > allServerSt.MaxServerId {
|
|
|
+ allServerSt.MaxServerId = tmpNode.ServerId
|
|
|
+ }
|
|
|
}
|
|
|
+ allServerSt.MaxServerId = serverNum
|
|
|
}
|
|
|
- allServerSt.MaxServerId = serverNum
|
|
|
|
|
|
return allServerSt
|
|
|
}
|
|
|
|
|
|
-func (this *ServerListNode) GetServerListNum(bWhite bool) int {
|
|
|
+func (this *ServerListNode) GetServerListNum(bWhite bool, p string) int {
|
|
|
if bWhite {
|
|
|
return len(this.serverNormalList)
|
|
|
+ } else if p == "IOS_1" {
|
|
|
+ retNum := 0
|
|
|
+ for idx := 0; idx < len(this.serverSpeList); idx++ {
|
|
|
+ if this.serverSpeList[idx].Invisible <= 0 {
|
|
|
+ retNum++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retNum
|
|
|
} else {
|
|
|
retNum := 0
|
|
|
for idx := 0; idx < len(this.serverNormalList); idx++ {
|