修改跨服聊天bug

back_recharge
mengchengzhen 2021-07-30 15:34:51 +08:00
parent 9979be777c
commit 47ce524be7
3 changed files with 12 additions and 3 deletions

View File

@ -272,8 +272,7 @@ public class ChatLogic {
private void checkSaveUser(User user) throws Exception {
ArenaOfUser query = CrossServiceLogic.getInstance().query(user.getId());
if (query == null){
ArenaOfUser arenaOfUser = CrossServiceLogic.getInstance().buildArenaOfUser(user);
CrossServiceLogic.getInstance().insert(arenaOfUser);
CrossServiceLogic.getInstance().dispose(user);
}
}

View File

@ -254,9 +254,15 @@ public class GlobleSystemLogic implements IEventHandler {
redisUtil.putMapEntrys(RedisKey.SERVER_SPLIT_INFO,"",split);
//发分组邮件
split.keySet().forEach(server->redisUtil.putMapEntry(RedisKey.SERVER_SPLIT_MAIL_INFO,"",server,0));
//清除分组聊天记录
for(int i=1;i<=areaId;i++){
redisUtil.del(RedisKey.CHAT_CROSS_INFO_CACHE+i);
redisUtil.del(RedisKey.CHAT_CROSS_MSG_ID+i);
}
//释放分布式锁
redisUtil.del("SERVER_SPLIT_REDIS_LOCK");
LOGGER.info("跨服分组结束");
// splitInfo = RedisUtil.getInstence().getMapValues(RedisKey.SERVER_SPLIT_INFO,"",String.class,Integer.class);
}

View File

@ -2974,7 +2974,11 @@ public class HeroLogic{
public int calTeamTotalForce(User targetUser,int teamId,boolean isMyself){
int totalForce =0;
targetUser.getTeamPosManager().setCurTeamPosId(teamId);
List<TeamPosHeroInfo> teamPosHeroInfoList = targetUser.getTeamPosManager().getTeamPosForHero().get(teamId);
Map<Integer, List<TeamPosHeroInfo>> teamPosForHero = targetUser.getTeamPosManager().getTeamPosForHero();
if(teamPosForHero==null||teamPosForHero.size()<=0){
return totalForce;
}
List<TeamPosHeroInfo> teamPosHeroInfoList = teamPosForHero.get(teamId);
if(teamPosHeroInfoList == null || teamPosHeroInfoList.isEmpty()){
return totalForce;
}