|
@@ -166,6 +166,9 @@ public class LumaServiceImpl implements LumaService {
|
|
|
}
|
|
}
|
|
|
videoParam.put("notify_hook", lumaHost + (EnvCommonService.active_pre.equals(envCommonService.getEnv()) ? "/8083" : "/8085") + VIDEO_NOTIFY_URL);
|
|
videoParam.put("notify_hook", lumaHost + (EnvCommonService.active_pre.equals(envCommonService.getEnv()) ? "/8083" : "/8085") + VIDEO_NOTIFY_URL);
|
|
|
SubmitResult result = unifiedSubmitVideo(videoParam, num);
|
|
SubmitResult result = unifiedSubmitVideo(videoParam, num);
|
|
|
|
|
+ if (result == null) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("生成视频失败,请联系客服");
|
|
|
|
|
+ }
|
|
|
LumaUserConversation lumaUserConversation = saveConversation(user.getId(), result, prompt);
|
|
LumaUserConversation lumaUserConversation = saveConversation(user.getId(), result, prompt);
|
|
|
result.setRid(lumaUserConversation.getId());
|
|
result.setRid(lumaUserConversation.getId());
|
|
|
return result;
|
|
return result;
|
|
@@ -269,6 +272,9 @@ public class LumaServiceImpl implements LumaService {
|
|
|
request.header("Authorization", apiProvider.getAuth());
|
|
request.header("Authorization", apiProvider.getAuth());
|
|
|
String body = request.execute().body();
|
|
String body = request.execute().body();
|
|
|
SubmitResult submitResult = Jsons.parseObject(body, SubmitResult.class);
|
|
SubmitResult submitResult = Jsons.parseObject(body, SubmitResult.class);
|
|
|
|
|
+ if (submitResult == null) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("扩展视频失败,请联系客服");
|
|
|
|
|
+ }
|
|
|
log.info("return body: {}", body);
|
|
log.info("return body: {}", body);
|
|
|
if (submitResult.getId() == null) {
|
|
if (submitResult.getId() == null) {
|
|
|
throw BusinessRuntimeException.getInstance("请输入正确的描述");
|
|
throw BusinessRuntimeException.getInstance("请输入正确的描述");
|