From 0c1ee4b252431509eabf241eb9516c5d8f22431d Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 18 Mar 2026 18:17:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E5=BE=80=E6=B4=BB=E5=8A=A8=E5=9B=BA?= =?UTF-8?q?=E5=AE=9AID=E5=8E=BB=E9=99=A4=EF=BC=8C=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=BC=80=E6=96=8B=E8=8A=82=E6=B4=BB=E5=8A=A8ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/task/SpinsTaskRestController.java | 3 --- .../activity/ActivityRechargeRankExe.java | 10 +------ .../gift/strategy/GiftCountStrategy.java | 2 +- .../SpringFestivalRechargeRewardTask.java | 2 +- .../ActivityRechargeTicketService.java | 2 +- .../impl/UserActivityRechargeServiceImpl.java | 27 +++++-------------- .../other-start/src/test/java/RedisTest.java | 4 +-- 7 files changed, 12 insertions(+), 38 deletions(-) diff --git a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/task/SpinsTaskRestController.java b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/task/SpinsTaskRestController.java index fe7dc89e..805a8d74 100644 --- a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/task/SpinsTaskRestController.java +++ b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/task/SpinsTaskRestController.java @@ -51,9 +51,6 @@ public class SpinsTaskRestController { */ @PostMapping("/receive/reward") public SpinsTaskRewardCO receiveReward(@Validated @RequestBody SpinsTaskReceiveRewardCmd cmd) { - if (cmd.getActivityId() == null) { - cmd.setActivityId(2005571533988298753L); - } return spinsTaskService.receiveTaskReward(cmd); } } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/ActivityRechargeRankExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/ActivityRechargeRankExe.java index 54567986..3b7e3fa4 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/ActivityRechargeRankExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/ActivityRechargeRankExe.java @@ -32,17 +32,9 @@ public class ActivityRechargeRankExe { private final UserProfileGateway userProfileGateway; private final UserProfileAppConvertor userProfileAppConvertor; - /** - * 2026春节游戏礼物活动 - */ - private static final Long FIXED_ACTIVITY_ID = 2007771533988204877L; - public ActivityRechargeRankCO execute(ActivityRechargeRankCmd cmd) { Page page = new Page<>(cmd.getPageNo(), cmd.getPageSize()); String rechargeType = null; - if (FIXED_ACTIVITY_ID.equals(cmd.getActivityId())) { - rechargeType = MonthlyRechargeType.LUCKY_WIN.name(); - } IPage rankPage = userActivityRechargeDAO.pageRechargeRank(page, cmd.getActivityId(), rechargeType); ActivityRechargeRankCO result = new ActivityRechargeRankCO(); @@ -79,7 +71,7 @@ public class ActivityRechargeRankExe { .setSpecialAccount(Optional.ofNullable(userProfile.getOwnSpecialId()) .map(OwnSpecialIdDTO::getAccount) .orElse(null)) - .setAmount(FIXED_ACTIVITY_ID.equals(cmd.getActivityId()) ? NumUtils.formatBigDecimal(dto.getTotalAmount()) : "***")); + .setAmount("***")); } result.setTopList(topList); 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 2fe8d5dd..01e84f2e 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 @@ -210,7 +210,7 @@ public class GiftCountStrategy implements GiftStrategy { processFamily(runningWater); // Spins 送礼物任务 - handleSpinsGiftTask(runningWater); +// handleSpinsGiftTask(runningWater); // 房间金币大放送 handleRoomDailyTask(runningWater, roomProfile); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/activity/SpringFestivalRechargeRewardTask.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/activity/SpringFestivalRechargeRewardTask.java index e5661be7..dbec878a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/activity/SpringFestivalRechargeRewardTask.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/activity/SpringFestivalRechargeRewardTask.java @@ -26,7 +26,7 @@ import java.util.List; @RequiredArgsConstructor public class SpringFestivalRechargeRewardTask { - private static final Long ACTIVITY_ID = 2007771533988204877L; + private static final Long ACTIVITY_ID = -1L; private static final String RECHARGE_TYPE = "LUCKY_WIN"; // TOP1~TOP3 各自独立奖励组,TOP4~10 共用同一个 diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java index 626244df..5bba5ec5 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/activity/ActivityRechargeTicketService.java @@ -27,7 +27,7 @@ public class ActivityRechargeTicketService { /** * 2026春节游戏礼物活动 */ - private static final Long FIXED_ACTIVITY_ID = 2007771533988204877L; + private static final Long FIXED_ACTIVITY_ID = -1L; /** * 每100000金币发放1张抽奖券 diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/activity/impl/UserActivityRechargeServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/activity/impl/UserActivityRechargeServiceImpl.java index 5f3824fa..4ae8659a 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/activity/impl/UserActivityRechargeServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/activity/impl/UserActivityRechargeServiceImpl.java @@ -23,19 +23,14 @@ public class UserActivityRechargeServiceImpl implements UserActivityRechargeServ private final UserActivityRechargeDAO userActivityRechargeDAO; /** - * 2026春节充值活动 - */ - private static final Long FIXED_ACTIVITY_ID = 2007771533988204888L; - - /** - * 2026春节抽奖 + * 2026斋月抽奖 */ private static final Long FIXED_ACTIVITY_ID2 = 2006671533988298666L; /** - * 2026斋月抽奖 + * 2026开斋节充值活动 */ - private static final Long FIXED_ACTIVITY_ID3 = 2007771533988204877L; + private static final Long FIXED_ACTIVITY_ID = 2006671533912581569L; /** * 热游 用户VIP等级 固定id @@ -47,25 +42,18 @@ public class UserActivityRechargeServiceImpl implements UserActivityRechargeServ LocalDate today = ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate(); String rechargeDate = today.toString(); - int result = userActivityRechargeDAO.incrAmount( - userId, - FIXED_ACTIVITY_ID, - rechargeDate, - type.name(), - amount - ); - userActivityRechargeDAO.incrAmount( userId, - FIXED_ACTIVITY_ID2, + FIXED_ACTIVITY_ID, rechargeDate, type.name(), amount ); + userActivityRechargeDAO.incrAmount( userId, - FIXED_ACTIVITY_ID3, + FIXED_ACTIVITY_ID2, rechargeDate, type.name(), amount @@ -78,9 +66,6 @@ public class UserActivityRechargeServiceImpl implements UserActivityRechargeServ type.name(), amount ); - - log.info("记录用户活动充值, userId:{}, amount:{}, type:{}, date:{}, result:{}", - userId, amount, type.name(), rechargeDate, result); } @Override diff --git a/rc-service/rc-service-other/other-start/src/test/java/RedisTest.java b/rc-service/rc-service-other/other-start/src/test/java/RedisTest.java index ab1cfad3..bbe624f2 100644 --- a/rc-service/rc-service-other/other-start/src/test/java/RedisTest.java +++ b/rc-service/rc-service-other/other-start/src/test/java/RedisTest.java @@ -32,7 +32,7 @@ public class RedisTest { private UserActivityRechargeDAO userActivityRechargeDAO; // 常量定义(与业务代码保持一致) - private static final Long FIXED_ACTIVITY_ID = 2007771533988204877L; + private static final Long FIXED_ACTIVITY_ID = -1L; private static final long TICKET_THRESHOLD = 100000L; // 每10000发一张券,请根据实际值修改 @Test @@ -65,7 +65,7 @@ public class RedisTest { @Test public void testRedis2(){ // 春节活动 已结束 - activityRechargeTicketService.accumulatedRechargeAndAddTicket(1957345312961527809L, 80000L, MonthlyRechargeType.UNDEFINED); +// activityRechargeTicketService.accumulatedRechargeAndAddTicket(1957345312961527809L, 80000L, MonthlyRechargeType.UNDEFINED); } /**