Ver a proveniência

修改提示信息

private_deployment
lrh há 1 ano
ascendente
cometimento
4194032dcf
4 ficheiros alterados com 23 adições e 17 eliminações
  1. +3
    -4
      suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java
  2. +17
    -10
      suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java
  3. +1
    -1
      suimangService/src/main/java/com/iformall/sm/AiPhotoSpeakResult.java
  4. +2
    -2
      suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java

+ 3
- 4
suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java Ver ficheiro

@@ -152,7 +152,6 @@ public class PhotoSpeakVideoController extends BaseController {
return photoSpeakVideoService.saveOrUpdate(record);
}

@AuthIgnore
@ApiOperation("生成视频")
@PostMapping("createVideo")
public ResultData create(@RequestBody PhotoSpeakVideo record) {
@@ -164,9 +163,9 @@ public class PhotoSpeakVideoController extends BaseController {

logger.info("TEST--"+ JSONObject.toJSONString(mouldVideo));

// if(mouldVideo == null || !mouldVideo.getUserId().equals(getMemberId())){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到用户数据");
// }
if(mouldVideo == null || !mouldVideo.getUserId().equals(getMemberId())){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到用户数据");
}

if(EnumVideoStatus.ing.getCode().equals(mouldVideo.getVideoStatus())
|| EnumVideoStatus.success.getCode().equals(mouldVideo.getVideoStatus())


+ 17
- 10
suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java Ver ficheiro

@@ -224,18 +224,25 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService {
param.setUrl(voiceMaterialUrl);
}

AiPhotoSpeakResult video = AiVideoHelper.createPhotoSpeakVideo(param);
if (video.isSuccess()) {
photoSpeakVideo.setSaveDir(video.getSaveDir());
photoSpeakVideo.setAudioPath(video.getAudioPath());
photoSpeakVideo.setVideoPath(video.getUrl());
try {
AiPhotoSpeakResult video = AiVideoHelper.createPhotoSpeakVideo(param);
if (video.isSuccess()) {
photoSpeakVideo.setSaveDir(video.getSaveDir());
photoSpeakVideo.setAudioPath(video.getAudioPath());
photoSpeakVideo.setVideoPath(video.getUrl());
this.updateById(photoSpeakVideo);
return new ResultData();
}
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode());
photoSpeakVideo.setVideoMsg(video.getMsg());
this.updateById(photoSpeakVideo);
return new ResultData();
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), video.getMsg());
}catch (Exception e){
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode());
photoSpeakVideo.setVideoMsg("Meta接口请求异常");
this.updateById(photoSpeakVideo);
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"Meta接口请求异常");
}
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode());
photoSpeakVideo.setVideoMsg(video.getMsg());
this.updateById(photoSpeakVideo);
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), video.getMsg());
} catch (Exception e) {
e.printStackTrace();
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode());


+ 1
- 1
suimangService/src/main/java/com/iformall/sm/AiPhotoSpeakResult.java Ver ficheiro

@@ -22,7 +22,7 @@ public class AiPhotoSpeakResult {
} else if (code == 3008 && msg.equals("check languages")) {
return "(MetaService)文字和语种不对应";
} else {
return "(MetaService)服务被Avatar攻击... 点击“编辑”重试";
return "(MetaService:" + msg + ")服务被Avatar攻击...";
}
}
}

+ 2
- 2
suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java Ver ficheiro

@@ -31,10 +31,10 @@ public class AiVideoHelper {
// http://nas.pucao.cn:2001/gen_dh_video
public static String uri = "http://nas.pucao.cn:2001";

// public static String url = "http://nas.pucao.cn:2002";
public static String url = "http://nas.pucao.cn:2002";
// public static String hy_url = "http://nas.pucao.cn:2002";

public static String url = "http://111.198.0.15:22299";
// public static String url = "http://111.198.0.15:22299";
public static String hy_url = "http://111.198.0.15:22288";

public static String photo_speak_suffix = "/img_talking";


Carregando…
Cancelar
Guardar