BUGFIX: 用户支付后获取账号到期时间为空,无法更新账号信息

This commit is contained in:
2025-02-17 10:18:57 +08:00
parent 43d2f83677
commit 5e7f898840

View File

@@ -2788,7 +2788,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
public boolean updateAccountValidity(Long accountId, Long currentPeriodEnd){
// 不管当前用户的账号是否到期,都根据付款信息重置账号到期时间
Account account = accountMapper.selectById(accountId);
if (account.getValidEndTime().equals(currentPeriodEnd * 1000)){
if (!Objects.isNull(account.getValidEndTime())
&& account.getValidEndTime().equals(currentPeriodEnd * 1000)){
return false;
}else {
account.setValidEndTime(currentPeriodEnd * 1000);