diff --git a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java index bb53377d..f80782b2 100644 --- a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java +++ b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/game/party3rd/GameHkysRestController.java @@ -11,6 +11,7 @@ import com.red.circle.component.game.hkys.response.HkysUserProfileResponse; import com.red.circle.component.game.hkys.response.HyksErrorEnum; import com.red.circle.component.game.hkys.response.UpdateUserCoinResponse; import com.red.circle.component.game.hotgame.response.HotGameCoin; +import com.red.circle.component.game.hotgame.response.HotGameErrorEnum; import com.red.circle.component.game.hotgame.response.HotGameResponse; import com.red.circle.external.inner.endpoint.message.ImGroupClient; import com.red.circle.external.inner.model.cmd.message.BroadcastGroupMsgBodyCmd; @@ -22,12 +23,15 @@ import com.red.circle.mq.rocket.business.producer.TaskMqMessage; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.cmd.game.GameLxwlUpdateBalanceCmd; import com.red.circle.other.app.dto.cmd.game.GameLxwlUserInfoCmd; +import com.red.circle.other.app.enums.violation.GameOriginEnum; +import com.red.circle.other.app.enums.violation.ViolationTypeEnum; import com.red.circle.other.app.util.OfficialNoticeUtils; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService; import com.red.circle.other.infra.database.rds.entity.sys.GameListConfig; import com.red.circle.other.infra.database.rds.service.sys.GameListConfigService; import com.red.circle.other.inner.enums.config.EnumConfigKey; +import com.red.circle.other.inner.enums.team.TeamPolicyTypeEnum; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.date.LocalDateTimeUtils; import com.red.circle.tool.core.parse.DataTypeUtils; @@ -136,8 +140,7 @@ public class GameHkysRestController { if (cmd.getType() != null && cmd.getType() == 2 && cmd.getCoin() >= cost.longValue()) { UserProfileDTO userProfile = userProfileAppConvertor.toUserProfileDTO( userProfileGateway.getByUserId(userId)); - - GameListConfig gameListConfig = gameListConfigService.getByGameId(cmd.getGameId(), sysOrigin); + GameListConfig gameListConfig = gameListConfigService.getByGameId(cmd.getGameId(), GameOriginEnum.LINGXIAN.name(), sysOrigin); if (Objects.nonNull(gameListConfig)) { Map build = OfficialNoticeUtils.buildUserProfile(userProfile); build.put("gameUrl", gameListConfig.getCover()); 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 73a5b3d8..7588b4c7 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 @@ -98,21 +98,12 @@ public class AppConfigRestController extends BaseController { public List listGameConfig(AppExtCommand cmd, @RequestParam(required = false) String roomId) { cmd.setRoomSessionId(roomId); List gameListConfigs = new ArrayList<>(appConfigService.listGameConfig(cmd)); - //获取用户等级 - UserConsumptionLevel userLevel = userProfileGateway.getUserConsumptionLevel( - cmd.requireReqSysOriginEnum(), - cmd.requiredReqUserId()); // 如果在游戏白名单,直接可以玩所有游戏 if (checkGameWhite(cmd.getReqUserId(), cmd.requireReqSysOrigin())) { return gameListConfigs; } - //审核用户无需等级限制 - if (cmd.getReqUserId() == 1864851759420661762L) { - gameListConfigs = new ArrayList<>(); - } - return gameListConfigs; } 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 c9389686..c7b88237 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.reqVersionIs191()))),cmd.reqVersionIsGameNew(),cmd.getReqAppIntel().getVersion()); + gameListConfigService.listShowcaseConfig(cmd.requireReqSysOrigin(),cmd.reqVersionIsGameNew()))),cmd.reqVersionIsGameNew(),cmd.getReqAppIntel().getVersion()); if (StringUtils.isBlank(data)) { return Lists.newArrayList(); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/enums/violation/GameOriginEnum.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/enums/violation/GameOriginEnum.java new file mode 100644 index 00000000..6acd5817 --- /dev/null +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/enums/violation/GameOriginEnum.java @@ -0,0 +1,11 @@ +package com.red.circle.other.app.enums.violation; + +public enum GameOriginEnum { + + BAISHUN, + + HOTGAME, + + LINGXIAN + +} diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java index 95a44197..22887f3c 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameBaishunServiceImpl.java @@ -25,6 +25,7 @@ import com.red.circle.mq.business.model.event.task.TaskApprovalEvent; import com.red.circle.mq.rocket.business.producer.TaskMqMessage; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.cmd.activity.RankingDataUpdateCmd; +import com.red.circle.other.app.enums.violation.GameOriginEnum; import com.red.circle.other.app.service.activity.RankingActivityService; import com.red.circle.other.app.util.OfficialNoticeUtils; import com.red.circle.other.domain.gateway.user.UserProfileGateway; @@ -193,7 +194,7 @@ public class GameBaishunServiceImpl implements GameBaishunService { UserProfileDTO userProfile = userProfileAppConvertor.toUserProfileDTO( userProfileGateway.getByUserId(DataTypeUtils.toLong(request.getUserId()))); - GameListConfig gameListConfig = gameListConfigService.getByGameId(request.getGameId(), sysOrigin); + GameListConfig gameListConfig = gameListConfigService.getByGameId(request.getGameId(), GameOriginEnum.LINGXIAN.name(), sysOrigin); if (Objects.nonNull(gameListConfig)) { Map build = OfficialNoticeUtils.buildUserProfile(userProfile); build.put("gameUrl", gameListConfig.getCover()); 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 80c4a0ed..d7c96f6f 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,boolean hotGame); + List listShowcaseConfig(String sysOrigin,boolean fullScreen); /** * 根据游戏code获得游戏封面图. @@ -45,7 +45,7 @@ public interface GameListConfigService extends BaseService { /** * 查询游戏信息 */ - GameListConfig getByGameId(String gameId, String sysOrigin); + GameListConfig getByGameId(String gameId, String gameOrigin, String sysOrigin); /** * 校验是否有游戏下架 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 4338200b..bfa4aa09 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,boolean hotGame) { + public List listShowcaseConfig(String sysOrigin,boolean fullScreen) { return query() .eq(GameListConfig::getSysOrigin, sysOrigin) .eq(GameListConfig::getShowcase, Boolean.TRUE) - .ne(hotGame,GameListConfig::getGameOrigin,"HOTGAME") .eq(GameListConfig::getFullScreen, fullScreen) .orderByDesc(GameListConfig::getSort) .list(); @@ -119,9 +118,10 @@ public class GameListConfigServiceImpl extends * @param gameId 1345 */ @Override - public GameListConfig getByGameId(String gameId, String sysOrigin) { + public GameListConfig getByGameId(String gameId, String gameOrigin, String sysOrigin) { return query() .eq(GameListConfig::getGameId, gameId) + .eq(GameListConfig::getGameOrigin, gameOrigin) .eq(GameListConfig::getSysOrigin, sysOrigin) .last(PageConstant.LIMIT_ONE) .getOne(); diff --git a/rc-service/rc-service-other/other-start/src/test/java/SpringTest.java b/rc-service/rc-service-other/other-start/src/test/java/SpringTest.java index 0ff82ce0..20305d7a 100644 --- a/rc-service/rc-service-other/other-start/src/test/java/SpringTest.java +++ b/rc-service/rc-service-other/other-start/src/test/java/SpringTest.java @@ -10,6 +10,7 @@ import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum; import com.red.circle.framework.core.dto.ReqSysOrigin; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.cmd.activity.RankingDataUpdateCmd; +import com.red.circle.other.app.enums.violation.GameOriginEnum; import com.red.circle.other.app.service.activity.RankingActivityService; import com.red.circle.other.app.service.user.user.AppUserDataViolationService; import com.red.circle.other.app.util.OfficialNoticeUtils; @@ -103,7 +104,7 @@ public class SpringTest { UserProfileDTO userProfile = userProfileAppConvertor.toUserProfileDTO( userProfileGateway.getByUserId(DataTypeUtils.toLong(userId))); - GameListConfig gameListConfig = gameListConfigService.getByGameId("1090", "LIKEI"); + GameListConfig gameListConfig = gameListConfigService.getByGameId("1090", GameOriginEnum.LINGXIAN.name(), "LIKEI"); if (Objects.nonNull(gameListConfig)) { Map build = OfficialNoticeUtils.buildUserProfile(userProfile); build.put("gameUrl", gameListConfig.getCover());