Revert "游戏打榜活动根据活动时间处理"
This reverts commit 5124df543897494b00ae12baecdf712bdfbdb5de.
This commit is contained in:
parent
3c8113f4e2
commit
5bfb1c3ca4
@ -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.RankingCycleType;
|
||||||
import com.red.circle.other.domain.ranking.RankingDimension;
|
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.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.entity.sys.GameListConfig;
|
||||||
import com.red.circle.other.infra.database.rds.service.sys.GameListConfigService;
|
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.config.EnumConfigKey;
|
||||||
@ -77,11 +75,8 @@ public class GameBaishunServiceImpl implements GameBaishunService {
|
|||||||
private final GameListConfigService gameListConfigService;
|
private final GameListConfigService gameListConfigService;
|
||||||
private final ImGroupClient imGroupClient;
|
private final ImGroupClient imGroupClient;
|
||||||
private final RankingActivityService rankingActivityService;
|
private final RankingActivityService rankingActivityService;
|
||||||
private final ActivityConfigService activityConfigService;
|
|
||||||
@Value("${red-circle.game-rank.gameid}")
|
@Value("${red-circle.game-rank.gameid}")
|
||||||
private String gameId;
|
private String gameId;
|
||||||
@Value("${red-circle.game-rank.templateId}")
|
|
||||||
private Long templateId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaishunResponse<BaishunTokenResponse> getToken(BaishunTokenRequest request) {
|
public BaishunResponse<BaishunTokenResponse> getToken(BaishunTokenRequest request) {
|
||||||
@ -216,11 +211,8 @@ public class GameBaishunServiceImpl implements GameBaishunService {
|
|||||||
|
|
||||||
//游戏是否参与打榜活动
|
//游戏是否参与打榜活动
|
||||||
if (gameId != null && gameId.equals(request.getGameId()) && request.getCurrencyDiff() > 0) {
|
if (gameId != null && gameId.equals(request.getGameId()) && request.getCurrencyDiff() > 0) {
|
||||||
ActivityConfig config = activityConfigService.getOngoingActivityConf(templateId, RankingActivityType.GREEDY_GAME.name());
|
incGameRankingActivity(DataTypeUtils.toLong(request.getUserId()), 1, request.getCurrencyDiff(),
|
||||||
if (config != null) {
|
request.getGameRoundId());
|
||||||
incGameRankingActivity(DataTypeUtils.toLong(request.getUserId()), 1, request.getCurrencyDiff(),
|
|
||||||
request.getGameRoundId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,8 +71,6 @@ public interface ActivityConfigService {
|
|||||||
|
|
||||||
ActivityConfig getShowcaseActivityConf(Long templateId, String activityType);
|
ActivityConfig getShowcaseActivityConf(Long templateId, String activityType);
|
||||||
|
|
||||||
ActivityConfig getOngoingActivityConf(Long templateId, String activityType);
|
|
||||||
|
|
||||||
List<ActivityConfig> listRecentlyEndedActivities(String sysOrigin, Integer limit);
|
List<ActivityConfig> listRecentlyEndedActivities(String sysOrigin, Integer limit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -250,20 +250,6 @@ public class ActivityConfigServiceImpl implements ActivityConfigService {
|
|||||||
, ActivityConfig.class);
|
, 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
|
@Override
|
||||||
public List<ActivityConfig> listRecentlyEndedActivities(String sysOrigin, Integer limit) {
|
public List<ActivityConfig> listRecentlyEndedActivities(String sysOrigin, Integer limit) {
|
||||||
Date now = TimestampUtils.now();
|
Date now = TimestampUtils.now();
|
||||||
|
|||||||
@ -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.RankingCycleType;
|
||||||
import com.red.circle.other.domain.ranking.RankingDimension;
|
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.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.entity.sys.GameListConfig;
|
||||||
import com.red.circle.other.infra.database.rds.service.sys.GameListConfigService;
|
import com.red.circle.other.infra.database.rds.service.sys.GameListConfigService;
|
||||||
import com.red.circle.other.inner.model.cmd.user.ApprovalAccountCmd;
|
import com.red.circle.other.inner.model.cmd.user.ApprovalAccountCmd;
|
||||||
@ -63,16 +61,6 @@ public class SpringTest {
|
|||||||
private AppUserDataViolationService userDataViolationService;
|
private AppUserDataViolationService userDataViolationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RankingActivityService rankingActivityService;
|
private RankingActivityService rankingActivityService;
|
||||||
@Autowired
|
|
||||||
private ActivityConfigService activityConfigService;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testQuery() {
|
|
||||||
ActivityConfig ongoingActivityConf = activityConfigService.getOngoingActivityConf(1994334094730010626L, RankingActivityType.GREEDY_GAME.name());
|
|
||||||
System.out.println();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGame() {
|
public void testGame() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user