|
|
@@ -510,15 +510,13 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
if (submitResult.getCode() == 1 || submitResult.getCode() == 22){
|
|
|
log.info("taskId:{},切换到:{}", submitResult.getResult(),midjourneyApiChannel.getName());
|
|
|
submitResult.setApiChannelId(midjourneyApiChannel.getId());
|
|
|
- }else if (submitResult.getCode() == 24) {
|
|
|
- JSONObject jsonObject = JSONUtil.parseObj(submitResult.getResult());
|
|
|
- throw BusinessRuntimeException.getInstance("prompt包含敏感词:"+jsonObject.getStr("bannedWord"));
|
|
|
}else {
|
|
|
if(submitResult.getCode() == 3){
|
|
|
log.info("服务商 :{}, 账号短缺", midjourneyApiChannel.getName());
|
|
|
throw BusinessRuntimeException.getInstance("该任务所属的源Mj账号已被官网封禁或暂时风控。请稍后再试,或重新生成图片");
|
|
|
}else {
|
|
|
log.error("服务商:{}, action:{}, error message:{}", midjourneyApiChannel.getName(), action, submitResult.getDescription());
|
|
|
+ throw BusinessRuntimeException.getInstance("该任务源Mj账号队列已满,请稍后尝试");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -528,13 +526,13 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
|
if (code == 4) {
|
|
|
throw BusinessRuntimeException.getInstance(submitResult.getDescription());
|
|
|
- }
|
|
|
- if (code == 24) {
|
|
|
+ }else if (code == 24) {
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(submitResult.getResult());
|
|
|
throw BusinessRuntimeException.getInstance("prompt包含敏感词:"+jsonObject.getStr("bannedWord"));
|
|
|
+ }else {
|
|
|
+ log.error("action:" + action + " error message:" + submitResult.getDescription());
|
|
|
+ throw BusinessRuntimeException.getInstance("该任务源Mj账号队列已满,请稍后尝试");
|
|
|
}
|
|
|
- //log.error("action:" + action + " error message:" + submitResult.getDescription());
|
|
|
- //throw BusinessRuntimeException.getInstance("该任务源Mj账号队列已满,请稍后尝试");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(accountWithMinUsage) && mode == 2) {
|
|
|
submitResult.setInstanceId(Long.valueOf(accountWithMinUsage));
|