BUGFIX:试用用户;

This commit is contained in:
shahaibo
2024-01-29 10:35:19 +08:00
parent 4380f0bc5b
commit 0afcf92582

View File

@@ -478,12 +478,12 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
if (CollectionUtil.isNotEmpty(accountList)) { if (CollectionUtil.isNotEmpty(accountList)) {
if (accountList.get(0).getIsTrial() == 1) { if (accountList.get(0).getIsTrial() == 1) {
throw new BusinessException("The username or email has already been registered", ResultEnum.PROMPT.getCode()); throw new BusinessException("The username or email has already been registered", ResultEnum.PROMPT.getCode());
}else {
Account account = accountList.get(0);
if (null == account.getValidEndTime() || account.getValidEndTime() > System.currentTimeMillis()) {
throw new BusinessException("The username or email has already been registered", ResultEnum.PROMPT.getCode());
}
} }
// else {
// Account account = accountList.get(0);
// account.setIsTrial(1);
// accountMapper.updateById(account);
// }
} }
// 接收到数据后要形成一条使用订单信息 // 接收到数据后要形成一条使用订单信息
TrialOrder trialOrder = CopyUtil.copyObject(accountTrialDTO, TrialOrder.class); TrialOrder trialOrder = CopyUtil.copyObject(accountTrialDTO, TrialOrder.class);