redis string获取错误处理

back_recharge
zhangshanxue 2019-11-29 17:58:52 +08:00
parent 77f1c94850
commit 05a00c8187
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
//临时代码 等前端出新包后删除2019 11 29 //临时代码 等前端出新包后删除2019 11 29
if(gid==0){ if(gid==0){
try { try {
String value = (String) RedisUtil.getInstence().get(RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId))); String value =( (String) RedisUtil.getInstence().get(RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId)))).replace("\"", "");
LOGGER.info("the value={}",value); LOGGER.info("the value={}",value);
String[] splitvalue = value.split("#"); String[] splitvalue = value.split("#");
if (splitvalue.length==2){ if (splitvalue.length==2){
@ -110,6 +110,7 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
gid = Integer.valueOf(splitvalue[1]); gid = Integer.valueOf(splitvalue[1]);
} }
}catch (Exception e){ }catch (Exception e){
e.getMessage();
} }
} }