BUGFIX: 续订没有更新账号到期时间
This commit is contained in:
@@ -3383,7 +3383,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
Account account = accountMapper.selectById(accountId);
|
Account account = accountMapper.selectById(accountId);
|
||||||
if (!Objects.isNull(account.getValidEndTime())
|
if (!Objects.isNull(account.getValidEndTime())
|
||||||
&& account.getValidEndTime().equals(currentPeriodEnd * 1000)) {
|
&& 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;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
account.setValidEndTime(currentPeriodEnd * 1000);
|
account.setValidEndTime(currentPeriodEnd * 1000);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public class InvoicePaidHandler implements StripeEventHandler {
|
|||||||
updateSubscriptionPeriod(invoice, subscriptionInfo);
|
updateSubscriptionPeriod(invoice, subscriptionInfo);
|
||||||
|
|
||||||
// 更新用户积分、账号到期时间,添加积分详细记录
|
// 更新用户积分、账号到期时间,添加积分详细记录
|
||||||
accountService.updateAccountValidity(subscriptionInfo.getAccountId(), invoice.getPeriodEnd());
|
accountService.updateAccountValidity(subscriptionInfo.getAccountId(), subscriptionInfo.getCurrentPeriodEnd());
|
||||||
accountService.updateUserRoleAndCredits(subscriptionInfo.getAccountId(), subscriptionInfo.getOrderNo());
|
accountService.updateUserRoleAndCredits(subscriptionInfo.getAccountId(), subscriptionInfo.getOrderNo());
|
||||||
|
|
||||||
// 发送通知邮件
|
// 发送通知邮件
|
||||||
|
|||||||
Reference in New Issue
Block a user