From 54fb972cf4d6b708b6aa66e4ebfc0a293ffbe244 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 19 Mar 2026 17:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E9=87=91=E5=B8=81=E5=A4=A7?= =?UTF-8?q?=E6=94=BE=E9=80=81VIP=E6=8A=98=E6=89=A3=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=B2=A1=E4=B8=AA=E6=A1=A3=E4=BD=8D=E8=AE=A1=E7=AE=97=E6=8A=98?= =?UTF-8?q?=E6=89=A3=E7=84=B6=E5=90=8E=E7=B4=AF=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/command/task/RoomDailyTaskClaimExe.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/task/RoomDailyTaskClaimExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/task/RoomDailyTaskClaimExe.java index c4aae551..f77ec537 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/task/RoomDailyTaskClaimExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/task/RoomDailyTaskClaimExe.java @@ -78,6 +78,8 @@ public class RoomDailyTaskClaimExe { .filter(t -> t.getTierIndex() > maxTierClaimed && t.getTierIndex() <= maxTierCompleted) .toList(); + BigDecimal vipRate = userProfileGateway.getUserVipBenefit(userId, VipBenefitType.XP_RATE); + long totalReward = 0; List records = new ArrayList<>(); for (RoomDailyTaskTier tier : claimableTiers) { @@ -85,7 +87,9 @@ public class RoomDailyTaskClaimExe { if (taskDatabaseService.existsClaimRecord(bizNo)) { continue; } - totalReward += tier.getRewardValue(); + // 每个档位单独计算 VIP 加成后累加 + long tierReward = new BigDecimal(tier.getRewardValue()).multiply(vipRate).setScale(0, RoundingMode.DOWN).longValue(); + totalReward += tierReward; RoomDailyTaskClaimRecord record = new RoomDailyTaskClaimRecord(); record.setUserId(userId); @@ -111,9 +115,6 @@ public class RoomDailyTaskClaimExe { taskDatabaseService.saveOrUpdateProgress(progress); taskDatabaseService.saveClaimRecords(records); - BigDecimal userVipBenefit = userProfileGateway.getUserVipBenefit(userId, VipBenefitType.XP_RATE); - totalReward = new BigDecimal(totalReward).multiply(userVipBenefit).setScale(0, RoundingMode.DOWN).longValue(); - // 发放奖励 String bizNo = taskCode + ":" + today + ":batch:" + maxTierClaimed + "-" + maxTierCompleted; walletGoldClient.changeBalance(GoldReceiptCmd.builder()