|
@@ -516,6 +516,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}else {
|
|
}else {
|
|
|
if(submitResult.getCode() == 3){
|
|
if(submitResult.getCode() == 3){
|
|
|
log.info("服务商 :{}, 账号短缺", midjourneyApiChannel.getName());
|
|
log.info("服务商 :{}, 账号短缺", midjourneyApiChannel.getName());
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("该任务所属的源Mj账号已被官网封禁或暂时风控。请稍后再试,或重新生成图片");
|
|
|
}else {
|
|
}else {
|
|
|
log.error("服务商:{}, action:{}, error message:{}", midjourneyApiChannel.getName(), action, submitResult.getDescription());
|
|
log.error("服务商:{}, action:{}, error message:{}", midjourneyApiChannel.getName(), action, submitResult.getDescription());
|
|
|
}
|
|
}
|
|
@@ -524,8 +525,6 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- //throw BusinessRuntimeException.getInstance("该任务所属的源Mj账号已被官网封禁或暂时风控。请稍后再试,或重新生成图片");
|
|
|
|
|
}
|
|
}
|
|
|
if (code == 4) {
|
|
if (code == 4) {
|
|
|
throw BusinessRuntimeException.getInstance(submitResult.getDescription());
|
|
throw BusinessRuntimeException.getInstance(submitResult.getDescription());
|
|
@@ -534,8 +533,8 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(submitResult.getResult());
|
|
JSONObject jsonObject = JSONUtil.parseObj(submitResult.getResult());
|
|
|
throw BusinessRuntimeException.getInstance("prompt包含敏感词:"+jsonObject.getStr("bannedWord"));
|
|
throw BusinessRuntimeException.getInstance("prompt包含敏感词:"+jsonObject.getStr("bannedWord"));
|
|
|
}
|
|
}
|
|
|
- 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) {
|
|
if (StringUtils.isNotBlank(accountWithMinUsage) && mode == 2) {
|
|
|
submitResult.setInstanceId(Long.valueOf(accountWithMinUsage));
|
|
submitResult.setInstanceId(Long.valueOf(accountWithMinUsage));
|