|
|
@@ -269,6 +269,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
String url = "";
|
|
|
String accountWithMinUsage = "";
|
|
|
Integer mode = user.getMode();
|
|
|
+ Object customId = param.get("customId");
|
|
|
if (mode == 1) {
|
|
|
param.put("mode", "FAST");
|
|
|
url = FAST_HOST;
|
|
|
@@ -278,8 +279,6 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
accountWithMinUsage = getAccountWithMinUsage(instanceId);
|
|
|
param.put("accountFilter",MapUtil.builder(new HashMap<String,Object>())
|
|
|
.put("instanceId",accountWithMinUsage).build());
|
|
|
- Object customId = param.get("customId");
|
|
|
- userSubmitLimit(user,action,customId);
|
|
|
}
|
|
|
url = url + getActionUrl(action);
|
|
|
param.put("notifyHook",midjourneyHost +(EnvCommonService.active.equals(envCommonService.getEnv()) ? "/8081":"/8082") + "/api/applets/midjourney/notifyHook");
|
|
|
@@ -311,8 +310,11 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
log.error("action:" + action + " error message:" + submitResult.getDescription());
|
|
|
throw BusinessRuntimeException.getInstance("队列已满,请稍后尝试");
|
|
|
}
|
|
|
- if (StringUtils.isNotBlank(accountWithMinUsage) && mode == 2) {
|
|
|
- submitResult.setInstanceId(Long.valueOf(accountWithMinUsage));
|
|
|
+ if (mode == 2){
|
|
|
+ userSubmitLimit(user,action,customId);
|
|
|
+ if (StringUtils.isNotBlank(accountWithMinUsage)) {
|
|
|
+ submitResult.setInstanceId(Long.valueOf(accountWithMinUsage));
|
|
|
+ }
|
|
|
}
|
|
|
return submitResult;
|
|
|
}
|