yanghui
2022-10-10 50687d620d71f7785f24fc0a8007c5a9f18e0e9d
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -2,6 +2,7 @@
import cn.hutool.core.util.StrUtil;
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.constants.NeighborCircleConstants;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.neighbor.*;
@@ -69,13 +70,13 @@
        if (StrUtil.isNotBlank(releaseContent)) {
            String result = checkService.checkMessageBy(releaseContent, this.getLoginUserInfo().getOpenid(), this.getAppId());
            if (StrUtil.isNotBlank(result)) {
                return R.fail("填写内容存在 " + result + " 违规信息");
                return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息");
            }
        }
        String releaseImages = addNeighborCircleAppDTO.getReleaseImages();
        if (StrUtil.isNotBlank(releaseImages)) {
            if (checkService.checkImageBy(releaseImages, this.getAppId())) {
                return R.fail("上传图片存在违规信息");
                return R.fail(Constants.NOTICE_FAIL, "上传图片存在违规信息");
            }
        }
        addNeighborCircleAppDTO.setUserId(userId);
@@ -87,6 +88,14 @@
        }
        //查询社区自动审核是否开着
        if (this.getAppId().equals("wx118de8a734d269f0")) {
            //花城直接通过
            addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no);
            addNeighborCircleAppDTO.setWxExamineResult(AddComActNeighborCircleAppDTO.isExamine.yes);
        } else {
            //西区
        String key = NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE;
        R isOk = communityService.getSysConfValue(key + communityId, communityId);
        if (R.isOk(isOk)) {
@@ -95,7 +104,7 @@
                if (value.equals("1")) {
                    addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no);
                    String msg = addNeighborCircleAppDTO.getReleaseContent();
                    if (checkService.checkMessage(msg)) {
                        if (StrUtil.isEmpty(checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(), this.getAppId()))) {
                        addNeighborCircleAppDTO.setWxExamineResult(AddComActNeighborCircleAppDTO.isExamine.yes);
                    } else {
                        addNeighborCircleAppDTO.setWxExamineResult(AddComActNeighborCircleAppDTO.isExamine.no);
@@ -109,6 +118,7 @@
            }
        } else {
            addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes);
            }
        }
        return communityService.addNeighborByApp(addNeighborCircleAppDTO);
@@ -177,7 +187,7 @@
        if (StrUtil.isNotBlank(content)) {
            String result = checkService.checkMessageBy(content, this.getLoginUserInfo().getOpenid(), this.getAppId());
            if (StrUtil.isNotBlank(result)) {
                return R.fail("填写内容存在 " + result + " 违规信息");
                return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息");
            }
        }
        commentAppDTO.setUserId(userId);
@@ -195,7 +205,7 @@
        if (StrUtil.isNotBlank(content)) {
            String result = checkService.checkMessageBy(content, this.getLoginUserInfo().getOpenid(), this.getAppId());
            if (StrUtil.isNotBlank(result)) {
                return R.fail("填写内容存在 " + result + " 违规信息");
                return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息");
            }
        }
        replyAppDTO.setUserId(userId);