fix: 创建提现时不再校验收款码确认时效
Some checks failed
Build and Push Backend / docker (push) Failing after 4s

This commit is contained in:
irving
2025-10-18 21:04:50 -04:00
parent d681635394
commit 6153e6e4f1

View File

@@ -28,8 +28,6 @@ import org.springframework.util.StringUtils;
public class WithdrawalServiceImpl extends ServiceImpl<WithdrawalRequestMapper, WithdrawalRequestEntity>
implements IWithdrawalService {
private static final long PAYEE_CONFIRMATION_MAX_MINUTES = 10L;
@Resource
private IEarningsService earningsService;
@Resource
@@ -49,13 +47,10 @@ public class WithdrawalServiceImpl extends ServiceImpl<WithdrawalRequestMapper,
if (payeeProfile == null || !StringUtils.hasText(payeeProfile.getQrCodeUrl())) {
throw new CustomException("请先上传支付宝收款码");
}
if (payeeProfile.getLastConfirmedAt() == null) {
throw new CustomException("请确认本次使用的收款码");
}
Duration sinceConfirm = Duration.between(payeeProfile.getLastConfirmedAt(), now);
if (sinceConfirm.isNegative() || sinceConfirm.toMinutes() > PAYEE_CONFIRMATION_MAX_MINUTES) {
throw new CustomException("收款码确认已过期,请重新确认");
}
// pick and reserve lines
List<EarningsLineEntity> lines = earningsService.findWithdrawable(clerkId, amount, now);