diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/cmd/sys/SysGameListConfigParamCmd.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/cmd/sys/SysGameListConfigParamCmd.java index ad69bf05..737540b4 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/cmd/sys/SysGameListConfigParamCmd.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/cmd/sys/SysGameListConfigParamCmd.java @@ -49,6 +49,11 @@ public class SysGameListConfigParamCmd extends CommonCommand { */ private String gameId; + /** + * 游戏分类 + */ + private String category; + /** * 游戏名称. */ diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/GameMatchModelConfigDTO.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/GameMatchModelConfigDTO.java index 14bf16d3..10d71c84 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/GameMatchModelConfigDTO.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/GameMatchModelConfigDTO.java @@ -49,6 +49,11 @@ public class GameMatchModelConfigDTO extends DTO { */ private String gameId; + /** + * 游戏分类 + */ + private String category; + /** * 游戏封面图. */ diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/SysGameListConfigDTO.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/SysGameListConfigDTO.java index 1706d0a3..3e72442f 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/SysGameListConfigDTO.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/sys/SysGameListConfigDTO.java @@ -56,6 +56,11 @@ public class SysGameListConfigDTO extends DTO { */ private String gameId; + /** + * 游戏分类 + */ + private String category; + /** * 游戏封面图. */ diff --git a/rc-service/rc-service-console/console-client/src/main/java/com/red/circle/console/app/dto/clienobject/sys/SysGameListConfigCO.java b/rc-service/rc-service-console/console-client/src/main/java/com/red/circle/console/app/dto/clienobject/sys/SysGameListConfigCO.java index 8dc7d76c..6b3ef02c 100644 --- a/rc-service/rc-service-console/console-client/src/main/java/com/red/circle/console/app/dto/clienobject/sys/SysGameListConfigCO.java +++ b/rc-service/rc-service-console/console-client/src/main/java/com/red/circle/console/app/dto/clienobject/sys/SysGameListConfigCO.java @@ -53,6 +53,11 @@ public class SysGameListConfigCO implements Serializable { */ private String gameCode; + /** + * 游戏分类 + */ + private String category; + /** * 游戏封面图. */ 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 7588b4c7..67da7ae0 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 @@ -96,15 +96,8 @@ public class AppConfigRestController extends BaseController { */ @GetMapping("/list-game-config") public List listGameConfig(AppExtCommand cmd, @RequestParam(required = false) String roomId) { - cmd.setRoomSessionId(roomId); - List gameListConfigs = new ArrayList<>(appConfigService.listGameConfig(cmd)); - - // 如果在游戏白名单,直接可以玩所有游戏 - if (checkGameWhite(cmd.getReqUserId(), cmd.requireReqSysOrigin())) { - return gameListConfigs; - } - - return gameListConfigs; + cmd.setRoomSessionId(roomId); + return appConfigService.listGameConfig(cmd); } public Boolean checkLoginStatus(Long userId) { 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 c7b88237..5d014b29 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.reqVersionIsGameNew(),cmd.getReqAppIntel().getVersion()); + gameListConfigService.listShowcaseConfig(cmd.requireReqSysOrigin()))),cmd.reqVersionIsGameNew(),cmd.getReqAppIntel().getVersion()); if (StringUtils.isBlank(data)) { return Lists.newArrayList(); diff --git a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/sys/GameListConfigCO.java b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/sys/GameListConfigCO.java index a2e5170f..b0c2aa99 100644 --- a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/sys/GameListConfigCO.java +++ b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/sys/GameListConfigCO.java @@ -3,10 +3,15 @@ package com.red.circle.other.app.dto.clientobject.sys; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.red.circle.framework.dto.ClientObject; +import com.red.circle.tool.core.date.TimestampUtils; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import java.sql.Timestamp; +import java.time.Duration; +import java.time.Instant; + /** *

* 游戏列表配置. @@ -43,6 +48,11 @@ public class GameListConfigCO extends ClientObject { */ private String gameOrigin; + /** + * 游戏分类 + */ + private String category; + /** * 游戏封面图. */ @@ -87,4 +97,21 @@ public class GameListConfigCO extends ClientObject { * 第三方游戏ID */ private Integer thirdGameId; + + /** + * 创建时间 + */ + private Timestamp createTime; + + private boolean isNew; + + public boolean isNew() { + if (createTime == null) { + return false; + } + Instant createInstant = createTime.toInstant(); + Instant now = Instant.now(); + Duration duration = Duration.between(createInstant, now); + return duration.toDays() < 7; + } } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/entity/sys/GameListConfig.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/entity/sys/GameListConfig.java index 805584ec..b89b5d9e 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/entity/sys/GameListConfig.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/entity/sys/GameListConfig.java @@ -51,6 +51,12 @@ public class GameListConfig extends TimestampBaseEntity { @TableField("name") private String name; + /** + * 游戏分类 + */ + @TableField("category") + private String category; + /** * 游戏编号. */ diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/GameListConfigService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/GameListConfigService.java index d7c96f6f..a07f636e 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/GameListConfigService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/GameListConfigService.java @@ -20,7 +20,7 @@ public interface GameListConfigService extends BaseService { /** * 获取上架配置. */ - List listShowcaseConfig(String sysOrigin,boolean fullScreen); + List listShowcaseConfig(String sysOrigin); /** * 根据游戏code获得游戏封面图. diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/impl/GameListConfigServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/impl/GameListConfigServiceImpl.java index bfa4aa09..888f6f18 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/impl/GameListConfigServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/sys/impl/GameListConfigServiceImpl.java @@ -27,11 +27,10 @@ public class GameListConfigServiceImpl extends BaseServiceImpl implements GameListConfigService { @Override - public List listShowcaseConfig(String sysOrigin,boolean fullScreen) { + public List listShowcaseConfig(String sysOrigin) { return query() .eq(GameListConfig::getSysOrigin, sysOrigin) .eq(GameListConfig::getShowcase, Boolean.TRUE) - .eq(GameListConfig::getFullScreen, fullScreen) .orderByDesc(GameListConfig::getSort) .list(); }