diff --git a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/sys/AppConfigRestController.java b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/sys/AppConfigRestController.java index 67da7ae0..be57d50e 100644 --- a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/sys/AppConfigRestController.java +++ b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/sys/AppConfigRestController.java @@ -100,23 +100,6 @@ public class AppConfigRestController extends BaseController { return appConfigService.listGameConfig(cmd); } - public Boolean checkLoginStatus(Long userId) { - if (redisTemplate.opsForHash().hasKey(EnumConfigKey.GAME_WHITE_LIST.name(),String.valueOf(userId))){ - return false; - } - return true; - } - - public Boolean checkGameWhite(Long userId, String sysOrigin) { - String whiteConfig = enumConfigCacheService.getValue(EnumConfigKey.GAME_WHITE_LIST, sysOrigin); - //log.warn("whiteConfig: {}", whiteConfig); - if (StringUtils.isNotBlank(whiteConfig)) { - List whiteIds = Arrays.asList(whiteConfig.split(",")); - return whiteIds.contains(userId.toString()); - } - return false; - } - /** * 房间内-sud游戏. */ diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/sys/query/GameListConfigQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/sys/query/GameListConfigQryExe.java index 5d014b29..93bcfa30 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/sys/query/GameListConfigQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/sys/query/GameListConfigQryExe.java @@ -109,7 +109,7 @@ public class GameListConfigQryExe { String data = gameListCacheService.listCache(cmd.requireReqSysOrigin(), sysOrigin -> JacksonUtils.toJson(sysConfigAppConvertor.toListGameListConfigCO( - gameListConfigService.listShowcaseConfig(cmd.requireReqSysOrigin()))),cmd.reqVersionIsGameNew(),cmd.getReqAppIntel().getVersion()); + gameListConfigService.listShowcaseConfig(cmd.requireReqSysOrigin()))), cmd.getReqAppIntel().getVersion()); if (StringUtils.isBlank(data)) { return Lists.newArrayList(); diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/GameListCacheService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/GameListCacheService.java index 0fc8e3af..1dcbe30d 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/GameListCacheService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/GameListCacheService.java @@ -12,7 +12,7 @@ public interface GameListCacheService { /** * 获取游戏列表缓存. */ - String listCache(String sysOrigin, Function orElse,boolean fullScreen,String version); + String listCache(String sysOrigin, Function orElse,String version); /** * 移除缓存. diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/impl/GameListCacheServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/impl/GameListCacheServiceImpl.java index 1ee28653..60818259 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/impl/GameListCacheServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/cache/service/other/impl/GameListCacheServiceImpl.java @@ -33,50 +33,24 @@ public class GameListCacheServiceImpl implements GameListCacheService { private final RedisService redisService; @Override - public String listCache(String sysOrigin, Function orElse, boolean fullScreen, String version) { - - String data = ""; - if (fullScreen) { - data = redisService.getString( - GameListKeys.GAME_LIST.getKey("FULLSCREEN:" + sysOrigin + ":" + version)); - - } else { - data = redisService.getString( - GameListKeys.GAME_LIST.getKey(sysOrigin + ":" + version)); - } - + public String listCache(String sysOrigin, Function orElse, String version) { + String key = GameListKeys.GAME_LIST.getKey(sysOrigin + ":" + version); + String data = redisService.getString(key); if (StringUtils.isBlank(data)) { String newData = orElse.apply(sysOrigin); if (StringUtils.isBlank(newData)) { return ""; } - if (fullScreen) { - - redisService.setString(GameListKeys.GAME_LIST.getKey("FULLSCREEN:" + sysOrigin + ":" + version), newData, - 180, TimeUnit.DAYS); - } else { - redisService.setString(GameListKeys.GAME_LIST.getKey(sysOrigin + ":" + version), newData, - 180, TimeUnit.DAYS); - - } - + redisService.setString(key, newData,1, TimeUnit.HOURS); return newData; } -// Set strings = redisScan(redisService.redisTemplate(), GameListKeys.GAME_LIST.getKey()); -// System.out.println(strings); return data; } @Override public void remove(String sysOrigin) { Set strings = RedisUtils.redisScan(redisService.redisTemplate(), GameListKeys.GAME_LIST.getKey()); - System.out.println(strings); - strings.forEach(redisService::delete); -// redisService.redisTemplate() -// redisService.delete(GameListKeys.GAME_LIST.getKey()); -// redisService.delete() -// redisService.delete(GameListKeys.GAME_LIST.getKey("FULLSCREEN:" + sysOrigin)); }