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: