|
|
@@ -171,15 +171,18 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
|
//如果是上传图片就去检验合法 |
|
|
|
if (EnumMouldSendType.build.getCode().equals(personPhotoInfo.getSendType())) { |
|
|
|
//校验图片是否合法 |
|
|
|
ResultData data = personPhotoService.checkPhoto(personPhotoUrl); |
|
|
|
if (data.code != 2000) { |
|
|
|
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("图片质量审核失败:" + data.message); |
|
|
|
videoUpd.setVideoMsg("图片质量审核失败:" + result.getMsg()); |
|
|
|
this.saveOrUpdate(videoUpd); |
|
|
|
return new AsyncResult<>(0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(StringUtils.isBlank(personPhotoUrl)){ |
|
|
|
videoUpd.setVideoStatus(EnumVideoStatus.fail.getCode()); |
|
|
|
videoUpd.setVideoMsg(msg); |
|
|
|