diff --git a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java index 4a7b5cc0..cbe440a2 100644 --- a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java @@ -659,10 +659,10 @@ public class GenerateServiceImpl extends ServiceImpl i if (!StringUtil.isNullOrEmpty(generateResultVO.getStatus())) collect.add(generateResultVO.getStatus()); results.add(generateResultVO); }); - // todo + if (taskIdList.size() == 4 && collect.size() == 1 && collect.contains("Fail")) { log.info("当前4个生成结果均为失败"); - throw new BusinessException("generate.interface.error"); + throw new BusinessException("generate.result.below.standard"); } return results; } diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 04a4260a..a40e7125 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -149,6 +149,7 @@ you.have.participated.in.the.event=You have participated in the event. only.original.works.can.participate.in.the.event=Sorry, only original works can participate in the event. remaining.credits.insufficient=Your remaining credits are insufficient for this generation. Please recharge. you.haven't.subscribed.to.any.products.yet=You haven't subscribed to any products yet +generate.result.below.standard=The quality of the generated images currently falls below standard. Please consider adjusting your prompt and trying again. # 可能会报异常 # Informative: diff --git a/src/main/resources/messages_zh.properties b/src/main/resources/messages_zh.properties index d7c144ab..803945e7 100644 --- a/src/main/resources/messages_zh.properties +++ b/src/main/resources/messages_zh.properties @@ -144,6 +144,7 @@ you.have.participated.in.the.event=您已经参与活动。 only.original.works.can.participate.in.the.event=抱歉,只有原创作品能参与活动。 remaining.credits.insufficient=您的剩余积分不够本次生成消耗,请充值 you.haven't.subscribed.to.any.products.yet=您还未订阅任何产品 +generate.result.below.standard=当前生成的图像质量低于标准。请考虑调整您的提示词并再次尝试 # 可能会报异常 # Informative: