|
|
@ -608,6 +608,7 @@ public class ScreenService implements IScreenService{ |
|
|
|
GameUserJoinExample example = new GameUserJoinExample(); |
|
|
|
example.createCriteria().andRecordIdEqualTo(start.getMemberRecord()); |
|
|
|
gameUserJoinDao.updateByExampleSelective(delUserJoin,example); |
|
|
|
redisUtil.del(GameConstant.generateGameKey(start.getMemberRecord())); |
|
|
|
} |
|
|
|
//延时通知
|
|
|
|
long startSend = gameRecord.getStartTime() - System.currentTimeMillis(); |
|
|
@ -639,14 +640,13 @@ public class ScreenService implements IScreenService{ |
|
|
|
GameUserJoinExample joinExample = new GameUserJoinExample(); |
|
|
|
joinExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()); |
|
|
|
List<GameUserJoin> userJoins = gameUserJoinDao.selectByExample(joinExample); |
|
|
|
// if (CollectionUtil.isEmpty(userJoins)) {
|
|
|
|
// return startGame;
|
|
|
|
// }
|
|
|
|
userJoins.forEach( userJoin -> { |
|
|
|
ClientDto.RedisUser user = ClientDto.RedisUser.getInstance(userJoin); |
|
|
|
redisUtil.zsSet(GameConstant.generateGameKey(gameRecord.getId()), JSON.toJSONString(user), 0, GameConstant.REDIS_TIME); |
|
|
|
}); |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(userJoins)) { |
|
|
|
userJoins.forEach( userJoin -> { |
|
|
|
ClientDto.RedisUser user = ClientDto.RedisUser.getInstance(userJoin); |
|
|
|
redisUtil.zsSet(GameConstant.generateGameKey(gameRecord.getId()), JSON.toJSONString(user), 0, GameConstant.REDIS_TIME); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//推送客户端
|
|
|
|
pushClient(gameRecord, executor); |
|
|
|