数值溢出和到账问题修复

This commit is contained in:
tianfeng 2026-03-05 14:27:46 +08:00
parent 9a11b8e5fc
commit 12a3ed0985
2 changed files with 7 additions and 1 deletions

View File

@ -107,7 +107,7 @@ public class RoomDailyTaskClaimExe {
taskDatabaseService.saveClaimRecords(records);
// 发放奖励
String bizNo = userId + ":" + taskCode + ":" + today + ":batch:" + maxTierClaimed + "-" + maxTierCompleted;
String bizNo = taskCode + ":" + today + ":batch:" + maxTierClaimed + "-" + maxTierCompleted;
walletGoldClient.changeBalance(GoldReceiptCmd.builder()
.appIncome()
.userId(userId)

View File

@ -73,6 +73,12 @@ public class RoomDailyTaskProgressUpdateExe {
return;
}
// 用最高档位 targetValue 截断防止溢出
int maxProgress = tiers.get(tiers.size() - 1).getTargetValue();
if (progressValue > maxProgress) {
progressValue = maxProgress;
}
if (progressValue <= progress.getCurrentValue()) {
return;
}