From 3e97b989c75da4a5a83b4c590418e868eeee0893 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 22 Dec 2025 14:42:56 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=B8=B8=E6=88=8F=E5=A2=9E=E5=8A=A0e?= =?UTF-8?q?ndTime=20=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E9=85=8D=E7=BD=AE?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 67a9010adf000fd6ba9d387c62a5c6a6e8ac24a6. --- .../app/service/game/HotGameServiceImpl.java | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java index 959c0079..eeb6a9cf 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/HotGameServiceImpl.java @@ -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 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;