generated from root/miduo_server
白名单测试
parent
5858117a41
commit
ebd0a8407c
|
@ -56,6 +56,10 @@ public class GetServerListController extends HttpServlet {
|
|||
req.put("plat", plat);
|
||||
req.put("server_version", Integer.valueOf(server_version));
|
||||
|
||||
|
||||
DBObject req2 = new BasicDBObject();
|
||||
req.put("white_openid", openId);
|
||||
|
||||
List<DBObject> serverList = new ArrayList<>();
|
||||
long local = System.currentTimeMillis();
|
||||
// if ((local - lastRefreshTime) > 10 * 1000 || serverInfosCache.isEmpty()) {
|
||||
|
@ -63,6 +67,7 @@ public class GetServerListController extends HttpServlet {
|
|||
lastRefreshTime = local;
|
||||
recommend = "";
|
||||
|
||||
List<DBObject> whiteListCacheList = BaseGlobal.getInstance().mongoDBPool.find(_WHITE_LIST, req2);
|
||||
whiteListCache = BaseGlobal.getInstance().mongoDBPool.findOne(_WHITE_LIST, openId);
|
||||
|
||||
List<DBObject> serverInfoList = BaseGlobal.getInstance().mongoDBPool.find(_COLLECTION_NAME, req);
|
||||
|
@ -84,7 +89,7 @@ public class GetServerListController extends HttpServlet {
|
|||
//state
|
||||
String server_id=serverInfo.get("server_id").toString();
|
||||
int num = getOnlineNum(server_id);
|
||||
if (whiteListCache != null && state == 1) {
|
||||
if (whiteListCacheList != null &&whiteListCacheList.size()!=0&& state == 1) {
|
||||
state = 2;
|
||||
} else {
|
||||
if (state == 5) {
|
||||
|
|
Loading…
Reference in New Issue