BUGFIX: 续订没有更新账号到期时间

This commit is contained in:
2026-05-07 11:20:08 +08:00
parent 75efc341be
commit bd6ba95a25
2 changed files with 2 additions and 2 deletions

View File

@@ -3383,7 +3383,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
Account account = accountMapper.selectById(accountId);
if (!Objects.isNull(account.getValidEndTime())
&& account.getValidEndTime().equals(currentPeriodEnd * 1000)) {
log.info("未更新账号有效期。current validEnd:{}, new validEnd:{}", account.getValidEndTime(), currentPeriodEnd);
log.info("accountId:{}未更新账号有效期。current validEnd:{}, new validEnd:{}", accountId, account.getValidEndTime(), currentPeriodEnd);
return false;
} else {
account.setValidEndTime(currentPeriodEnd * 1000);

View File

@@ -90,7 +90,7 @@ public class InvoicePaidHandler implements StripeEventHandler {
updateSubscriptionPeriod(invoice, subscriptionInfo);
// 更新用户积分、账号到期时间,添加积分详细记录
accountService.updateAccountValidity(subscriptionInfo.getAccountId(), invoice.getPeriodEnd());
accountService.updateAccountValidity(subscriptionInfo.getAccountId(), subscriptionInfo.getCurrentPeriodEnd());
accountService.updateUserRoleAndCredits(subscriptionInfo.getAccountId(), subscriptionInfo.getOrderNo());
// 发送通知邮件