From b9a446ae4c0f65ff702b47d1503aa836112d505f Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 9 Feb 2026 12:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=8B=E6=9C=88=E6=B4=BB=E5=8A=A8=E6=8A=BD?= =?UTF-8?q?=E5=A5=96=E8=BF=9B=E5=BA=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game/party3rd/GameHkysRestController.java | 4 ++-- .../gift/strategy/GiftCountStrategy.java | 17 ++++++++++------- .../other/app/listener/task/TaskListener.java | 2 +- .../app/service/game/GameActivityService.java | 18 +++++++++--------- .../service/game/GameBaishunServiceImpl.java | 4 ++-- .../app/service/game/HotGameServiceImpl.java | 4 ++-- .../app/service/game/YomiGameServiceImpl.java | 6 ++---- 7 files changed, 28 insertions(+), 27 deletions(-) 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 fed2f3fb..4ebdcf4a 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 @@ -189,8 +189,8 @@ public class GameHkysRestController { //累计游戏排行榜 incGameRankingRecord(cmd, gameListConfig); - //处理游戏消费任务 - if (cmd.getType() == 1) { + //处理游戏获得任务 + if (cmd.getType() == 2) { gameActivityService.handleGameSpendTask(userId, cmd.getCoin()); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java index b70bd5a8..c8004925 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java @@ -692,13 +692,16 @@ public class GiftCountStrategy implements GiftStrategy { log.info("Spins送礼物任务, userId={}, giftCount={}", userId, giftCount); - // 处理送出5个礼物任务 - spinsUserTaskProgressService.updateTaskProgress( - new SpinsTaskProgressUpdateCmd() - .setUserId(userId) - .setTaskCode("SPINS_SEND_GIFT_5") - .setProgressValue(giftCount) - ); + List giftIds = List.of(2008386103976968193L, 1995470109066625026L, 1991071998523138049L); + if (runningWater.getGiftId() != null && giftIds.contains(runningWater.getGiftId())) { + // 处理送出5个礼物任务 + spinsUserTaskProgressService.updateTaskProgress( + new SpinsTaskProgressUpdateCmd() + .setUserId(userId) + .setTaskCode("SPINS_SEND_GIFT_5") + .setProgressValue(giftCount) + ); + } log.info("Spins送礼物任务处理成功, userId={}, giftCount={}", userId, giftCount); } catch (Exception e) { diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java index 5d6bdc9b..c7237575 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java @@ -183,7 +183,7 @@ public class TaskListener implements MessageListener { spinsUserTaskProgressService.updateTaskProgress( new SpinsTaskProgressUpdateCmd() .setUserId(userId) - .setTaskCode("SPINS_MIC_1_HOUR") + .setTaskCode("SPINS_MIC_90_MIN") .setProgressValue(micTime) ); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameActivityService.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameActivityService.java index e954439d..6750fc06 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameActivityService.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/GameActivityService.java @@ -18,17 +18,17 @@ import java.util.concurrent.TimeUnit; @RequiredArgsConstructor public class GameActivityService { - private static final long MAX_DAILY_SPEND = 50000L; - private static final String REDIS_KEY_PREFIX = "spins:daily:game:spend:"; + private static final long MAX_DAILY_SPEND = 500000L; + private static final String REDIS_KEY_PREFIX = "spins:daily:game:save:"; private final RedisService redisService; private final SpinsUserTaskProgressService spinsUserTaskProgressService; /** - * 处理游戏消费任务 + * 处理游戏消费/获得任务 * * @param userId 用户ID - * @param spendAmount 本次消费金额 + * @param spendAmount 本次消费/获得金额 */ public void handleGameSpendTask(Long userId, Long spendAmount) { try { @@ -46,7 +46,7 @@ public class GameActivityService { redisService.expire(redisKey, expireSeconds, TimeUnit.SECONDS); } - // 如果累计已经超过50000,不再处理任务 + // 如果累计已经超过500000,不再处理任务 if (totalSpend - spendAmount >= MAX_DAILY_SPEND) { log.info("Spins游戏消费任务已达上限, userId={}, totalSpend={}", userId, totalSpend); return; @@ -64,27 +64,27 @@ public class GameActivityService { } /** - * 更新游戏消费进度 + * 更新游戏进度 */ private void updateGameSpendProgress(Long userId, int progressValue) { spinsUserTaskProgressService.updateTaskProgress( new SpinsTaskProgressUpdateCmd() .setUserId(userId) - .setTaskCode("SPINS_SPEND_5000") + .setTaskCode("SPINS_SAVE_50000") .setProgressValue(progressValue) ); spinsUserTaskProgressService.updateTaskProgress( new SpinsTaskProgressUpdateCmd() .setUserId(userId) - .setTaskCode("SPINS_SPEND_10000") + .setTaskCode("SPINS_SAVE_100000") .setProgressValue(progressValue) ); spinsUserTaskProgressService.updateTaskProgress( new SpinsTaskProgressUpdateCmd() .setUserId(userId) - .setTaskCode("SPINS_SPEND_50000") + .setTaskCode("SPINS_SAVE_500000") .setProgressValue(progressValue) ); } 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 f71414f9..7680c9e0 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 @@ -218,8 +218,8 @@ public class GameBaishunServiceImpl implements GameBaishunService { //累计游戏排行榜 incGameRankingRecord(request, gameListConfig); - //处理游戏消费任务 - if (request.getCurrencyDiff() < 0) { + //处理游戏获得任务 + if (request.getCurrencyDiff() > 0) { gameActivityService.handleGameSpendTask(userId, Math.abs(request.getCurrencyDiff())); } } 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 efcefa03..cfacbd60 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 @@ -318,8 +318,8 @@ public class HotGameServiceImpl implements HotGameService { //FruitParty incGameRankingTmpActivity(param); - //处理游戏消费任务 - if (param.getType() == 1) { + //处理游戏获得任务 + if (param.getType() == 2) { gameActivityService.handleGameSpendTask(userId, param.getCoin()); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java index d1bef897..266c248a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java @@ -171,13 +171,11 @@ public class YomiGameServiceImpl implements YomiGameService { // 游戏参与打榜活动 incGameRankingActivity(userId, changeValue, gameConfig.getGameId()); - } - //处理游戏消费任务 - if (isConsume(cmd)) { + //处理游戏获得任务 gameActivityService.handleGameSpendTask(userId, changeValue.longValue()); } - + return new YomiBalanceCO(currentBalance); } catch (Exception e) {