From d65e2ddaa75b42ba4281db28c3ea8acbe8df0ca4 Mon Sep 17 00:00:00 2001 From: lrh <1585126058@qq.com> Date: Thu, 22 Jun 2023 14:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E5=BC=80=E5=9B=BE=E7=89=87=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E6=A3=80=E6=9F=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PhotoSpeakVideoController.java | 6 ++-- .../sm/impl/PhotoSpeakVideoServiceImpl.java | 28 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java b/suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java index 017ed2f..97be191 100644 --- a/suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java +++ b/suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java @@ -156,9 +156,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()) diff --git a/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java index 2f8f362..3a80625 100644 --- a/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java @@ -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)){