generated from root/miduo_server
添加错误码
parent
a833a6a913
commit
5c8a6d7a2a
|
@ -70,7 +70,13 @@ public class GetUserController extends HttpServlet {
|
||||||
String[] split = banInfo.split("\\|");
|
String[] split = banInfo.split("\\|");
|
||||||
long currentTimeMillis = System.currentTimeMillis();
|
long currentTimeMillis = System.currentTimeMillis();
|
||||||
if (Long.parseLong(split[0]) > currentTimeMillis) {
|
if (Long.parseLong(split[0]) > currentTimeMillis) {
|
||||||
response.sendError(400, split[1]);
|
DBObject res = new BasicDBObject();
|
||||||
|
res.put("errorCode", -1);
|
||||||
|
res.put("reason", split[1]);
|
||||||
|
PrintWriter out = response.getWriter();
|
||||||
|
out.print(res);
|
||||||
|
out.flush();
|
||||||
|
out.close();
|
||||||
LOGGER.info("doGet can not login Ban_Open_Id=>{} openId=>{} banInfo==null ? {}", RedisKey.Ban_Open_Id, openId, banInfo==null ? null : banInfo);
|
LOGGER.info("doGet can not login Ban_Open_Id=>{} openId=>{} banInfo==null ? {}", RedisKey.Ban_Open_Id, openId, banInfo==null ? null : banInfo);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -146,6 +152,7 @@ public class GetUserController extends HttpServlet {
|
||||||
uid = (int) userInfos.get(0).get("uid");
|
uid = (int) userInfos.get(0).get("uid");
|
||||||
res.put("uid", uid);
|
res.put("uid", uid);
|
||||||
res.put("token", utoken);
|
res.put("token", utoken);
|
||||||
|
res.put("errorCode", 0);
|
||||||
BaseGlobal.getInstance().redisApp.set(RedisKey.TOKEN, String.valueOf(uid), utoken, -1, false);
|
BaseGlobal.getInstance().redisApp.set(RedisKey.TOKEN, String.valueOf(uid), utoken, -1, false);
|
||||||
BaseGlobal.getInstance().redisApp.set(RedisKey.PIDGIDTEMP, String.valueOf(uid), pid+"#"+gid, -1, false);
|
BaseGlobal.getInstance().redisApp.set(RedisKey.PIDGIDTEMP, String.valueOf(uid), pid+"#"+gid, -1, false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue