slogan 参数校验

This commit is contained in:
2024-06-18 13:13:20 +08:00
parent e6a2ce2b69
commit 4f12aa92b6
4 changed files with 11 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
throw new BusinessException("chat-bot.interface.exception");
}
}
log.error("ChatRobot exception!");
log.error("ChatRobot exception! 请求异常:{}", response);
throw new BusinessException("chat-bot.interface.exception");
}

View File

@@ -529,7 +529,12 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
if (generateThroughImageTextDTO.getLevel2Type().equals(CollectionLevel2TypeEnum.SLOGAN.getRealName())){
if (StringUtil.isNullOrEmpty(generateThroughImageTextDTO.getSloganBase64())){
log.error("Printboard-Slogan模式下slogan image为空");
throw new BusinessException("Slogan can not be empty!");
throw new BusinessException("slogan.image.cannot.be.empty");
}
if (StringUtil.isNullOrEmpty(generateThroughImageTextDTO.getText())){
log.error("Printboard-Slogan模式下slogan text为空");
throw new BusinessException("slogan.style.cannot.be.empty");
}
times = 1;