登录gid记录

back_recharge
zhangshanxue 2019-12-04 14:56:08 +08:00
parent 106af8c853
commit d96b323657
1 changed files with 30 additions and 4 deletions

View File

@ -82,14 +82,40 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
KTEnvironmentUtil.addUserSimpleEnviromentInfo(userId,paramEnvironmentSimpleBean);
KTEnvironmentUtil.addUserEnviromentInfo(userId,paramEnvironmentBean);
int pid = 0;
if(!StringUtil.isEmpty(loginRequest.getChannelS())){
pid = Integer.valueOf(loginRequest.getChannelS());
int gid = 0;
String channelS = loginRequest.getChannelS();
String[] splitChannelS = channelS.split("#");
if(splitChannelS.length==1){
if(!StringUtil.isEmpty(splitChannelS[0])){
pid = Integer.valueOf(splitChannelS[0]);
}
}else if (splitChannelS.length>=2){
if(!StringUtil.isEmpty(splitChannelS[0])){
pid = Integer.valueOf(splitChannelS[0]);
}
if(!StringUtil.isEmpty(splitChannelS[1])){
gid = Integer.valueOf(splitChannelS[1]);
}
}
LOGGER.info("the uid={},the channel={}",userId,pid);
// //临时代码 等前端出新包后删除2019 11 29
// if(gid==0){
// try {
// String value =( (String) RedisUtil.getInstence().get(RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId)))).replace("\"", "");
// LOGGER.info("the value={}",value);
// String[] splitvalue = value.split("#");
// if (splitvalue.length==2){
// pid = Integer.valueOf(splitvalue[0]);
// gid = Integer.valueOf(splitvalue[1]);
// }
// }catch (Exception e){
// e.getMessage();
// }
// }
LOGGER.info("the uid={},the pid={},the gid={},",userId,pid,gid);
//登陆注册入内存
String openIdFront = loginRequest.getOpenId();
String[] split = openIdFront.split("\\.");