From 9f7987306c66cf421a696a314cdf489e395ae121 Mon Sep 17 00:00:00 2001 From: xupei Date: Thu, 18 Dec 2025 13:38:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BUGFIX:=E8=AE=A2=E9=98=85=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/service/impl/SubscriptionPlanServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java b/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java index 892a75a7..66080460 100644 --- a/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java @@ -74,6 +74,10 @@ public class SubscriptionPlanServiceImpl extends ServiceImpl Date: Thu, 18 Dec 2025 14:52:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?BUGFIX:=E8=AE=A2=E9=98=85=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=B8=8E=E5=AD=90=E8=B4=A6=E5=8F=B7=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/service/impl/AccountServiceImpl.java | 3 ++- 1 file changed, 2 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 4becada3..e17804a9 100644 --- a/src/main/java/com/ai/da/service/impl/AccountServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/AccountServiceImpl.java @@ -3553,7 +3553,8 @@ public class AccountServiceImpl extends ServiceImpl impl // 只有当前子账号数量为0时允许批量上传 QueryWrapper qw = new QueryWrapper<>(); qw.lambda().eq(Account::getSystemUser, 8) - .eq(Account::getOrganizationId, parent.getOrganizationId()); + .eq(Account::getOrganizationId, parent.getOrganizationId()) + .eq(Account::getSubscriptionPlanId, parent.getSubscriptionPlanId()); List accounts = accountMapper.selectList(qw); if (!accounts.isEmpty()) { throw new BusinessException("permit.bulk.creation", ResultEnum.PROMPT.getCode()); From 4fa70a1c901fc775e80489dae8980942cf75e3a4 Mon Sep 17 00:00:00 2001 From: xupei Date: Thu, 18 Dec 2025 18:03:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?BUGFIX:=E8=AE=A2=E9=98=85=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=B8=8D=E5=85=81=E8=AE=B8=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E5=AD=90=E8=B4=A6=E5=8F=B7=E4=B8=BA=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../da/service/impl/SubscriptionPlanServiceImpl.java | 12 ++++++++++-- src/main/resources/messages_en.properties | 1 + src/main/resources/messages_zh.properties | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java b/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java index 66080460..8b00a551 100644 --- a/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/SubscriptionPlanServiceImpl.java @@ -37,10 +37,14 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; +import static com.ai.da.mapper.primary.entity.SubscriptionPlan.SubscriptionStatus.ACTIVE; +import static com.ai.da.mapper.primary.entity.SubscriptionPlan.SubscriptionStatus.PENDING; + @Slf4j @Service @RequiredArgsConstructor @@ -62,7 +66,7 @@ public class SubscriptionPlanServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("is_deleted", 0) // 未删除 + queryWrapper.eq("is_deleted", 0) // 未删除 + .in("status", Arrays.asList(PENDING.name(), ACTIVE.name())) // 还未被激活的,或者设置为激活状态但是未被实际激活的 .between("current_period_start", todayStart, todayEnd) // 今天开始生效 .orderByAsc("current_period_start"); // 按开始时间排序 diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 8f445fcf..0218ebe1 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -208,6 +208,7 @@ page.num.limit=The page number must be greater than 0. end.time.must.be.later.than.the.start.time=The subscription end time must be later than the start time. please.specify.the.organizationId=Please specify the organizationId. switch.failed.sub-account.not.under.your.active.subscription=Switch failed. Sub-account not under your active subscription. +Sub-accounts.cannot.be.admins=Sub-accounts in a subscription cannot be designated as admins. # 可能会报异常 # Informative: diff --git a/src/main/resources/messages_zh.properties b/src/main/resources/messages_zh.properties index 84fa8822..1922707b 100644 --- a/src/main/resources/messages_zh.properties +++ b/src/main/resources/messages_zh.properties @@ -204,6 +204,7 @@ page.num.limit=页码必须大于0 end.time.must.be.later.than.the.start.time=订阅结束时间必须晚于开始时间 please.specify.the.organizationId=请指定organizationId switch.failed.sub-account.not.under.your.active.subscription=切换失败,该子账号不属于您当前管理的订阅计划 +Sub-accounts.cannot.be.admins=在订阅中的子账号不能被指定为管理员 # 可能会报异常 # Informative: