Browse Source

//..

private_deployment
xhxu 1 year ago
parent
commit
3a9fdc3eed
2 changed files with 15 additions and 15 deletions
  1. +14
    -14
      suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java
  2. +1
    -1
      suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java

+ 14
- 14
suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java View File

@@ -190,20 +190,20 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService {
msg = "未查询到人物照片";
} else {
personPhotoUrl = photoSpeakVideo.getPersonPhotoUrl();
// PersonPhoto personPhotoInfo = personPhotoService.getById(photoSpeakVideo.getPersonPhotoId());
// //如果是上传图片就去检验合法
// if (EnumMouldSendType.build.getCode().equals(personPhotoInfo.getSendType())) {
// //校验图片是否合法
// AiCheckPhotoParam param = new AiCheckPhotoParam();
// param.setImg(Base64Util.imageUrlToBase64(personPhotoUrl));
// AiCheckPhotoResult result = AiVideoHelper.checkPhoto(param);
// if (result.getCode() != 2000) {
// videoUpd.setVideoStatus(EnumVideoStatus.fail.getCode());
// videoUpd.setVideoMsg("图片质量审核失败:" + result.getMsg());
// this.saveOrUpdate(videoUpd);
// return new AsyncResult<>(0);
// }
// }
PersonPhoto personPhotoInfo = personPhotoService.getById(photoSpeakVideo.getPersonPhotoId());
//如果是上传图片就去检验合法
if (EnumMouldSendType.build.getCode().equals(personPhotoInfo.getSendType())) {
//校验图片是否合法
AiCheckPhotoParam param = new AiCheckPhotoParam();
param.setImg(Base64Util.imageUrlToBase64(personPhotoUrl));
AiCheckPhotoResult result = AiVideoHelper.checkPhoto(param);
if (result.getCode() != 2000) {
videoUpd.setVideoStatus(EnumVideoStatus.fail.getCode());
videoUpd.setVideoMsg("图片质量审核:" + result.getMsg());
this.saveOrUpdate(videoUpd);
return new AsyncResult<>(0);
}
}
}

if(StringUtils.isBlank(personPhotoUrl)){


+ 1
- 1
suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java View File

@@ -151,7 +151,7 @@ public class AiVideoHelper {
String msg = status.getString("msg");
if (code == null) {
result.setSuccess(false);
result.setMsg("请求生成视频异常,请稍后重试");
result.setMsg("请求异常,请稍后重试");
return result;
}
if (code.intValue() == 2000) {


Loading…
Cancel
Save