Revert "游戏增加endTime 结束时间配置"
This reverts commit 67a9010adf000fd6ba9d387c62a5c6a6e8ac24a6.
This commit is contained in:
parent
9ef37c2a3b
commit
3e97b989c7
@ -38,7 +38,6 @@ import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheSe
|
||||
import com.red.circle.other.infra.database.cache.service.other.GameListCacheService;
|
||||
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.utils.ZonedDateTimeUtils;
|
||||
import com.red.circle.other.inner.enums.config.EnumConfigKey;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import com.red.circle.tool.core.date.LocalDateTimeUtils;
|
||||
@ -56,11 +55,6 @@ import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO;
|
||||
import com.red.circle.wallet.inner.model.enums.GoldOrigin;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.chrono.ChronoZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@ -95,8 +89,6 @@ public class HotGameServiceImpl implements HotGameService {
|
||||
private final RankingActivityService rankingActivityService;
|
||||
@Value("${red-circle.game-rank.gameid}")
|
||||
private String gameId;
|
||||
@Value("${red-circle.game-rank.endTime}")
|
||||
private String endTime;
|
||||
|
||||
@Override
|
||||
public HotGameResponse<HotGameUserProfile> getUserProfile(HotGameUserProfileQuery query) {
|
||||
@ -257,16 +249,12 @@ public class HotGameServiceImpl implements HotGameService {
|
||||
|
||||
private void incGameRankingTmpActivity(HotGameUserCoinUpdate request) {
|
||||
if (gameId != null && gameId.equals(request.getGameId()) && request.getType() == 2 && request.getCoin() > 0) {
|
||||
ZonedDateTime gameEndTime = getGameEndTime(endTime);
|
||||
if (gameEndTime == null || ZonedDateTimeAsiaRiyadhUtils.now().isAfter(gameEndTime)) {
|
||||
return;
|
||||
}
|
||||
RankingDataUpdateCmd receiverCmd = new RankingDataUpdateCmd();
|
||||
receiverCmd.setUserId(DataTypeUtils.toLong(request.getUid()));
|
||||
receiverCmd.setUserSex(1);
|
||||
receiverCmd.setActivityType(RankingActivityType.FRUIT_PARTY.getCode());
|
||||
receiverCmd.setCycleType(RankingCycleType.MONTHLY.getCode());
|
||||
receiverCmd.setCycleKey("202512");
|
||||
receiverCmd.setCycleType(RankingCycleType.WEEKLY.getCode());
|
||||
receiverCmd.setCycleKey(ZonedDateTimeAsiaRiyadhUtils.nowWeekMondayToInt().toString());
|
||||
receiverCmd.setDimension(RankingDimension.GAME_WIN.getCode());
|
||||
receiverCmd.setIncrementQuantity(request.getCoin());
|
||||
receiverCmd.setBizNo(request.getGameId());
|
||||
@ -275,18 +263,6 @@ public class HotGameServiceImpl implements HotGameService {
|
||||
}
|
||||
}
|
||||
|
||||
private ZonedDateTime getGameEndTime(String endTime) {
|
||||
if (StringUtils.isBlank(endTime)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
LocalDateTime localDateTime = LocalDateTime.parse(endTime,DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
return localDateTime.atZone(ZoneId.of("Asia/Riyadh"));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void incGameRankingRecord(HotGameUserCoinUpdate request, GameListConfig gameListConfig) {
|
||||
if (request.getType() != 2 || gameListConfig == null || request.getCoin() <= 0) {
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user