From 1a568621cac14ebde7f475259930f2e2bbb3a179 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 3 Dec 2024 11:51:01 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:=E9=87=8D=E5=A4=8D=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E8=AF=95=E7=94=A8;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ai/da/service/impl/AccountServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ai/da/service/impl/AccountServiceImpl.java b/src/main/java/com/ai/da/service/impl/AccountServiceImpl.java index 1a07fb08..c0097b5c 100644 --- a/src/main/java/com/ai/da/service/impl/AccountServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/AccountServiceImpl.java @@ -538,7 +538,12 @@ public class AccountServiceImpl extends ServiceImpl impl // .like(TrialOrder::getUserName, accountTrialDTO.getUserName())); List 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 qw = new QueryWrapper<>();