获取gid

back_recharge
zhangshanxue 2019-11-29 15:56:39 +08:00
parent 513b0418d3
commit 1a9f356130
3 changed files with 6 additions and 5 deletions

View File

@ -64,8 +64,8 @@ public class Repot37EventUtil {
report37CheckChat.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));//uid report37CheckChat.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));//uid
report37CheckChat.setActor_name(user.getPlayerInfoManager().getNickName()); report37CheckChat.setActor_name(user.getPlayerInfoManager().getNickName());
report37CheckChat.setActor_id(String.valueOf(user.getId())); report37CheckChat.setActor_id(String.valueOf(user.getId()));
report37CheckChat.setGid(SDK37Constans.gid); report37CheckChat.setGid(String.valueOf(user.getPlayerInfoManager().getGid()));
report37CheckChat.setPid(SDK37Constans.pid); report37CheckChat.setPid(String.valueOf(user.getPlayerInfoManager().getPid()));
report37CheckChat.setDsid(String.valueOf(GameApplication.serverId)); report37CheckChat.setDsid(String.valueOf(GameApplication.serverId));
report37CheckChat.setType(parm[0].toString());//类型 report37CheckChat.setType(parm[0].toString());//类型
report37CheckChat.setContent(parm[1].toString());//内容 report37CheckChat.setContent(parm[1].toString());//内容

View File

@ -1068,7 +1068,8 @@ public class RedisUtil {
public String getKey(String type,String key){ public String getKey(String type,String key){
if(RedisKey.BLOODY_RANK.equals(type) || RedisKey.BLOODY_TEAM.equals(type) || RedisKey.PLAYER_INFO_CACHE.equals(type) || RedisKey.BLOODY_PERSON_BATTLE_INFO.equals(type)||RedisKey.FAMILY_INFO.equals(type)) { if(RedisKey.BLOODY_RANK.equals(type) || RedisKey.BLOODY_TEAM.equals(type) || RedisKey.PLAYER_INFO_CACHE.equals(type) || RedisKey.BLOODY_PERSON_BATTLE_INFO.equals(type)
||RedisKey.FAMILY_INFO.equals(type)||RedisKey.PIDGIDTEMP.equals(type)) {
return type + RedisKey.Delimiter_colon + key; return type + RedisKey.Delimiter_colon + key;
} }
if(RedisKey.familyKey.contains(type)){ if(RedisKey.familyKey.contains(type)){

View File

@ -103,7 +103,7 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
if(gid==0){ if(gid==0){
try { try {
String value = RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId)); String value = RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId));
LOGGER.info("the value",value);
String[] splitvalue = value.split("#"); String[] splitvalue = value.split("#");
if (splitvalue.length==2){ if (splitvalue.length==2){
pid = Integer.valueOf(splitvalue[0]); pid = Integer.valueOf(splitvalue[0]);
@ -113,7 +113,7 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
} }
} }
LOGGER.info("the uid={},the channel={},the pid={},the getgid={}",userId,pid,gid); LOGGER.info("the uid={},the pid={},the gid={},",userId,pid,gid);
//登陆注册入内存 //登陆注册入内存
String openIdFront = loginRequest.getOpenId(); String openIdFront = loginRequest.getOpenId();
String[] split = openIdFront.split("\\."); String[] split = openIdFront.split("\\.");