|
|
@@ -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)){ |
|
|
|