是否手动领取 领取限制问题

This commit is contained in:
tianfeng 2025-11-13 22:09:19 +08:00
parent 91b876367e
commit 1ca118c07b
3 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,7 @@ public class RocketRestController {
*/
@PostMapping("/claim")
public RocketRewardCO claimReward(@Valid @RequestBody RocketRewardClaimCmd cmd) {
cmd.setReceive(true);
return rocketService.claimReward(cmd);
}
}

View File

@ -142,7 +142,7 @@ public class RocketRewardClaimCmdExe {
// 4. 检查库存查询不递增
int rewardQuantity = config.getRewardQuantity() != null ? config.getRewardQuantity() : 20;
int currentClaimed = latestHistory.getClaimedCount() != null ? latestHistory.getClaimedCount() : 0;
if (currentClaimed >= rewardQuantity) {
if (Boolean.TRUE.equals(cmd.getReceive()) && currentClaimed >= rewardQuantity) {
return null;
}

View File

@ -22,4 +22,9 @@ public class RocketRewardClaimCmd extends AppExtCommand {
@NotNull(message = "房间ID不能为空")
private Long roomId;
/**
* 是否手动领取
*/
private Boolean receive;
}