generated from root/miduo_server
添加日志
parent
7f00158af7
commit
2b93fb95c5
|
@ -191,12 +191,15 @@ public class GetUserController extends HttpServlet {
|
|||
userInfos = BaseGlobal.getInstance().mongoDBPool.find(_COLLECTION_NAME, dbObject);
|
||||
//双重校验
|
||||
if (userInfos.size() == 0) {
|
||||
LOGGER.info("========================");
|
||||
DBObject next = server_info.iterator().next();
|
||||
Object register_state = next.get("register_state");
|
||||
if(register_state!=null&& register_state.equals("0")){
|
||||
LOGGER.info("========================");
|
||||
returnErrorToFront(res,response,"该服务器已停止注册,请选择其他服务器游戏");
|
||||
return;
|
||||
}
|
||||
LOGGER.info("========================");
|
||||
uid = BaseGlobal.getInstance().mongoDBPool.inc("uid") + 10000000;
|
||||
dbObject.put("uid", uid);
|
||||
dbObject.put("_id", uid);
|
||||
|
@ -204,9 +207,11 @@ public class GetUserController extends HttpServlet {
|
|||
if (gid != null && !gid.isEmpty()) {
|
||||
dbObject.put("gid", gid);
|
||||
}
|
||||
LOGGER.info("========================");
|
||||
if (pid != null && !pid.isEmpty()) {
|
||||
dbObject.put("pid", pid);
|
||||
}
|
||||
LOGGER.info("========================");
|
||||
BaseGlobal.getInstance().mongoDBPool.save(_COLLECTION_NAME, dbObject);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue