From 1a6eb2ac656de3b35c64db8b9006db2ed9248872 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期五, 04 十一月 2022 17:43:13 +0800 Subject: [PATCH] Merge branch 'huacheng_test' into haucheng_panzhihua --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java index 9194887..4ca605c 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java @@ -79,7 +79,7 @@ if (StrUtil.isNotBlank(detail)) { String result = checkService.checkMessageBy(detail, openid, appId); if (StrUtil.isNotBlank(result)) { - return R.fail("填写内容存在 " + result + " 违规信息"); + return R.fail(501, "填写内容存在 " + result + " 违规信息"); } } @@ -87,7 +87,7 @@ String photoPathList = comActEasyPhotoVO.getPhotoPathList(); if (StrUtil.isNotBlank(photoPathList)) { if (!checkService.checkImageBy(photoPathList, appId)) { - return R.fail("上传图片存在违规信息"); + return R.fail(501, "上传图片存在违规信息"); } } LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); @@ -184,7 +184,7 @@ if (StrUtil.isNotBlank(comment)) { String result = checkService.checkMessageBy(comment, openid, appId); if (StrUtil.isNotBlank(result)) { - return R.fail("填写内容存在 " + result + " 违规信息"); + return R.fail(501, "填写内容存在 " + result + " 违规信息"); } } comActEasyPhotoCommentDTO.setUserId(this.getUserId()); @@ -232,8 +232,11 @@ public R addMicroWish(@RequestBody @Validated(AddGroup.class) ComActMicroWishVO comActMicroWishVO) { // 微信内容审核 String msg = comActMicroWishVO.getDetail(); - if (!checkService.checkMessage(msg)) { - return R.fail("内容违规"); + if (StrUtil.isNotBlank(msg)) { + String result = checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(),this.getAppId()); + if (StrUtil.isNotBlank(result)) { + return R.fail(501, "填写内容存在 " + result + " 违规信息"); + } } LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); Long communityId = loginUserInfo.getCommunityId(); @@ -317,8 +320,11 @@ public R addMessage(@RequestBody @Validated(AddGroup.class) ComActMessageVO comActMessageVO) { // 微信内容审核 String msg = comActMessageVO.getMsgContent(); - if (!checkService.checkMessage(msg)) { - return R.fail("内容违规"); + if (StrUtil.isNotBlank(msg)) { + String result = checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(),this.getAppId()); + if (StrUtil.isNotBlank(result)) { + return R.fail(501, "填写内容存在 " + result + " 违规信息"); + } } LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); Long communityId = loginUserInfo.getCommunityId(); @@ -344,8 +350,11 @@ public R addMessageBack(@RequestBody @Validated(AddGroup.class) ComActMessageBackVO comActMessageBackVO) { // 微信内容审核 String msg = comActMessageBackVO.getMsgContent(); - if (!checkService.checkMessage(msg)) { - return R.fail("内容违规"); + if (StrUtil.isNotBlank(msg)) { + String result = checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(),this.getAppId()); + if (StrUtil.isNotBlank(result)) { + return R.fail(501, "填写内容存在 " + result + " 违规信息"); + } } LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); Long communityId = loginUserInfo.getCommunityId(); -- Gitblit v1.7.1