获取gid

back_recharge
zhangshanxue 2019-11-29 12:54:10 +08:00
parent b1736e56bc
commit 0d4e4ee5fd
1 changed files with 15 additions and 5 deletions

View File

@ -83,13 +83,23 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
KTEnvironmentUtil.addUserEnviromentInfo(userId,paramEnvironmentBean); KTEnvironmentUtil.addUserEnviromentInfo(userId,paramEnvironmentBean);
int pid = 0; int pid = 0;
if(!StringUtil.isEmpty(loginRequest.getChannelS())){ int gid = 0;
pid = Integer.valueOf(loginRequest.getChannelS()); 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); LOGGER.info("the uid={},the channel={},,the pid={}",userId,pid,gid);
//登陆注册入内存 //登陆注册入内存
String openIdFront = loginRequest.getOpenId(); String openIdFront = loginRequest.getOpenId();
String[] split = openIdFront.split("\\."); String[] split = openIdFront.split("\\.");