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 c1e585c2..95a44197 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 @@ -32,8 +32,6 @@ import com.red.circle.other.domain.ranking.RankingActivityType; import com.red.circle.other.domain.ranking.RankingCycleType; import com.red.circle.other.domain.ranking.RankingDimension; import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService; -import com.red.circle.other.infra.database.mongo.entity.sys.ActivityConfig; -import com.red.circle.other.infra.database.mongo.service.sys.ActivityConfigService; 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; @@ -77,11 +75,8 @@ public class GameBaishunServiceImpl implements GameBaishunService { private final GameListConfigService gameListConfigService; private final ImGroupClient imGroupClient; private final RankingActivityService rankingActivityService; - private final ActivityConfigService activityConfigService; @Value("${red-circle.game-rank.gameid}") private String gameId; - @Value("${red-circle.game-rank.templateId}") - private Long templateId; @Override public BaishunResponse getToken(BaishunTokenRequest request) { @@ -216,11 +211,8 @@ public class GameBaishunServiceImpl implements GameBaishunService { //游戏是否参与打榜活动 if (gameId != null && gameId.equals(request.getGameId()) && request.getCurrencyDiff() > 0) { - ActivityConfig config = activityConfigService.getOngoingActivityConf(templateId, RankingActivityType.GREEDY_GAME.name()); - if (config != null) { - incGameRankingActivity(DataTypeUtils.toLong(request.getUserId()), 1, request.getCurrencyDiff(), - request.getGameRoundId()); - } + incGameRankingActivity(DataTypeUtils.toLong(request.getUserId()), 1, request.getCurrencyDiff(), + request.getGameRoundId()); } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/ActivityConfigService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/ActivityConfigService.java index 965b6822..71428932 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/ActivityConfigService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/ActivityConfigService.java @@ -71,8 +71,6 @@ public interface ActivityConfigService { ActivityConfig getShowcaseActivityConf(Long templateId, String activityType); - ActivityConfig getOngoingActivityConf(Long templateId, String activityType); - List listRecentlyEndedActivities(String sysOrigin, Integer limit); /** diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/impl/ActivityConfigServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/impl/ActivityConfigServiceImpl.java index dccc2cf6..c4e2e2c1 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/impl/ActivityConfigServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/sys/impl/ActivityConfigServiceImpl.java @@ -250,20 +250,6 @@ public class ActivityConfigServiceImpl implements ActivityConfigService { , ActivityConfig.class); } - public ActivityConfig getOngoingActivityConf(Long templateId, String activityType) { - Date now = TimestampUtils.now(); - Criteria criteria = Criteria.where("showcase").is(true); - criteria.and("templateId").is(templateId); - criteria.and("activityType").is(activityType); - criteria.and("startTime").lte(now); - criteria.and("endTime").gte(now); - - return mongoTemplate.findOne(Query.query(criteria) - .with(Sort.by(Sort.Order.desc("id"))) - .limit(1) - , ActivityConfig.class); - } - @Override public List listRecentlyEndedActivities(String sysOrigin, Integer limit) { Date now = TimestampUtils.now(); 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 8a029ac9..0ff82ce0 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 @@ -21,8 +21,6 @@ import com.red.circle.other.domain.ranking.RankingActivityType; import com.red.circle.other.domain.ranking.RankingCycleType; import com.red.circle.other.domain.ranking.RankingDimension; import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService; -import com.red.circle.other.infra.database.mongo.entity.sys.ActivityConfig; -import com.red.circle.other.infra.database.mongo.service.sys.ActivityConfigService; 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.model.cmd.user.ApprovalAccountCmd; @@ -63,16 +61,6 @@ public class SpringTest { private AppUserDataViolationService userDataViolationService; @Autowired private RankingActivityService rankingActivityService; - @Autowired - private ActivityConfigService activityConfigService; - - @Test - public void testQuery() { - ActivityConfig ongoingActivityConf = activityConfigService.getOngoingActivityConf(1994334094730010626L, RankingActivityType.GREEDY_GAME.name()); - System.out.println(); - - - } @Test public void testGame() {