BUGFIX:重复申请试用;

This commit is contained in:
shahaibo
2024-12-03 11:51:01 +08:00
parent eecefee674
commit 1a568621ca

View File

@@ -538,7 +538,12 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
// .like(TrialOrder::getUserName, accountTrialDTO.getUserName()));
List<TrialOrder> trialOrders = trialOrderMapper.selectList(trialOrderQueryWrapper);
if (CollectionUtil.isNotEmpty(trialOrders)) {
throw new BusinessException("You have submitted a trial application, please wait for approval.");
TrialOrder trialOrder = trialOrders.get(0);
if (trialOrder.getStatus() == 1) {
throw new BusinessException("You have submitted a trial application, please wait for approval.");
}else {
throw new BusinessException("You have already been approved for a trial, please do not apply for the trial again");
}
}
// 先检测用户名和邮箱
QueryWrapper<Account> qw = new QueryWrapper<>();