all
huanghongfa
2021-02-25 afeb571ca27a185766615c2b68fcfa5b13a56dab
all
12个文件已修改
1个文件已添加
194 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommonApi.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/PartyBuildingApi.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/weixin/CheckService.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvJumpDO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -23,7 +23,19 @@
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/weixin/CheckService.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/CommonApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/CommonApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/PartyBuildingApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/PartyBuildingApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/UserApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvJumpDO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvJumpDO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -177,15 +189,13 @@
        <option name="Make" enabled="true" />
      </method>
    </configuration>
    <configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
    <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
      <option name="arquillianRunConfiguration">
        <value>
          <option name="containerStateName" value="" />
        </value>
      </option>
      <option name="TEST_OBJECT" value="CLASS" />
      <properties />
      <listeners />
      <option name="TEST_OBJECT" value="class" />
      <method v="2">
        <option name="Make" enabled="true" />
      </method>
@@ -431,7 +441,12 @@
      <workItem from="1613609849178" duration="13230000" />
      <workItem from="1613633203630" duration="14394000" />
      <workItem from="1613714097966" duration="14584000" />
      <workItem from="1613782093187" duration="14086000" />
      <workItem from="1613782093187" duration="17613000" />
      <workItem from="1614041234746" duration="1257000" />
      <workItem from="1614047190511" duration="1228000" />
      <workItem from="1614146399536" duration="4002000" />
      <workItem from="1614213754832" duration="85000" />
      <workItem from="1614219125851" duration="3423000" />
    </task>
    <servers />
  </component>
@@ -479,10 +494,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="499" y="159" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1536.824@0.0.1536.824" timestamp="1613713199165" />
    <state width="562" height="466" key="DebuggerActiveHint" timestamp="1613728742869">
    <state width="562" height="466" key="DebuggerActiveHint" timestamp="1614222823789">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="562" height="466" key="DebuggerActiveHint/0.0.1536.824@0.0.1536.824" timestamp="1613728742869" />
    <state width="562" height="466" key="DebuggerActiveHint/0.0.1536.824@0.0.1536.824" timestamp="1614222823789" />
    <state x="93" y="93" width="1350" height="638" key="DiffContextDialog" timestamp="1612321934878">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -491,54 +506,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1612426172959" />
    <state width="1031" height="264" key="GridCell.Tab.0.bottom" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.0.bottom" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.0.center" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.0.center" timestamp="1614223349914">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.0.left" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1614223349914" />
    <state width="1031" height="265" key="GridCell.Tab.0.left" timestamp="1614223349914">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.0.right" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1614223349914" />
    <state width="1031" height="265" key="GridCell.Tab.0.right" timestamp="1614223349914">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.1.bottom" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1614223349914" />
    <state width="1031" height="265" key="GridCell.Tab.1.bottom" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.1.center" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.1.center" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.1.left" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.1.left" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.1.right" timestamp="1613802505462">
    <state width="1031" height="265" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.1.right" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1613802505462" />
    <state width="1031" height="264" key="GridCell.Tab.2.bottom" timestamp="1613802505463">
    <state width="1031" height="265" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.2.bottom" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1613802505463" />
    <state width="1031" height="264" key="GridCell.Tab.2.center" timestamp="1613802505463">
    <state width="1031" height="265" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.2.center" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1613802505463" />
    <state width="1031" height="264" key="GridCell.Tab.2.left" timestamp="1613802505463">
    <state width="1031" height="265" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.2.left" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1613802505463" />
    <state width="1031" height="264" key="GridCell.Tab.2.right" timestamp="1613802505463">
    <state width="1031" height="265" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state width="1031" height="265" key="GridCell.Tab.2.right" timestamp="1614223349915">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="264" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1613802505463" />
    <state width="1031" height="265" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1614223349915" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1612603382513">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -567,10 +582,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.SelectionHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1611623127978" />
    <state x="233" y="42" width="921" height="782" key="find.popup" timestamp="1613785366330">
    <state x="233" y="42" width="921" height="782" key="find.popup" timestamp="1614219881345">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="233" y="42" width="921" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1613785366330" />
    <state x="233" y="42" width="921" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1614219881345" />
    <state width="600" height="428" key="javadoc.popup" timestamp="1610005781618">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommonApi.java
@@ -1,5 +1,7 @@
package com.panzhihua.applets.api;
import cn.binarywang.wx.miniapp.api.WxMaSecCheckService;
import com.panzhihua.applets.config.WxMaConfiguration;
import com.panzhihua.common.constants.FtpConstants;
import com.panzhihua.common.constants.UserConstants;
import com.panzhihua.common.model.vos.R;
@@ -8,6 +10,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.apache.commons.lang3.RandomUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
@@ -18,6 +21,8 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Base64;
import java.util.UUID;
@@ -51,15 +56,36 @@
    @Value("${ftp.url}")
    private String url;
    @Resource
    private WxMaConfiguration wxMaConfiguration;
    @ApiOperation(value = "上传照片")
    @PostMapping(value = "uploadimage",consumes = "multipart/*",headers = "content-type=multipart/form-date")
    public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) {
    public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) throws IOException {
//        微信图片内容校验
        WxMaSecCheckService wxMaSecCheckService=wxMaConfiguration.getMaService().getSecCheckService();
        String property = System.getProperty("user.dir");
        String fileName = property + File.separator + UUID.randomUUID().toString().replace("-", "")+".jpg";
        File file1=new File(fileName);
        String name = file.getOriginalFilename();
        name= UUID.randomUUID().toString().replaceAll("-","")+".jpg";
        try {
            SFTPUtil sftp = new SFTPUtil(userName,password,host,port);
            sftp.login();
            InputStream is = file.getInputStream();
            file.transferTo(file1);
        try {
            boolean b = wxMaSecCheckService.checkImage(file1);
            boolean delete = file1.delete();
            log.info("临时文件删除【{}】",delete);
            if (!b) {
                return R.fail("图片内容违规");
            }
        } catch (WxErrorException e) {
            log.error("微信审核图片出错【{}】",e.getMessage());
            e.printStackTrace();
        }
            sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
            sftp.logout();
            return R.ok(url+"/idcard/" + name);
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java
@@ -1,5 +1,7 @@
package com.panzhihua.applets.api;
import com.panzhihua.applets.config.WxMaConfiguration;
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
@@ -32,10 +34,18 @@
public class DiscussApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @Resource
    private CheckService checkService;
    @ApiOperation(value = "一起议-新增")
    @PostMapping("discuss")
    public R addDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) {
//        微信内容审核
        String discussSubject = comActDiscussDTO.getDiscussSubject();
        if (!checkService.checkMessage(discussSubject)) {
            return R.fail("内容违规");
        }
        Integer type = comActDiscussDTO.getType();
        String voteTitle = comActDiscussDTO.getVoteTitle();
        List<String> discussOptions = comActDiscussDTO.getDiscussOptions();
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
@@ -1,5 +1,6 @@
package com.panzhihua.applets.api;
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO;
@@ -42,6 +43,8 @@
    private CommunityService communityService;
    @Resource
    private UserService userService;
    @Resource
    private CheckService checkService;
    @ApiOperation(value = "分页展示社区随手拍",response = ComActEasyPhotoVO.class)
    @PostMapping("pageeasyphoto")
@@ -59,6 +62,11 @@
    @ApiOperation("上传随手拍")
    @PostMapping("easyphoto")
    public R addEasyPhoto (@RequestBody @Validated(AddGroup.class) ComActEasyPhotoVO comActEasyPhotoVO){
        //        微信内容审核
        String msg = comActEasyPhotoVO.getDetail();
        if (!checkService.checkMessage(msg)) {
            return R.fail("内容违规");
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long communityId = loginUserInfo.getCommunityId();
        if (null==communityId||0==communityId) {
@@ -136,6 +144,11 @@
    @ApiOperation("发布微心愿")
    @PostMapping("microwish")
    public R addMicroWish (@RequestBody @Validated(AddGroup.class) ComActMicroWishVO comActMicroWishVO){
        //        微信内容审核
        String msg = comActMicroWishVO.getDetail();
        if (!checkService.checkMessage(msg)) {
            return R.fail("内容违规");
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long communityId = loginUserInfo.getCommunityId();
        if (null==communityId||0==communityId) {
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/PartyBuildingApi.java
@@ -1,6 +1,7 @@
package com.panzhihua.applets.api;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.partybuilding.ActivitySignUpDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComPbActivityDTO;
@@ -37,6 +38,8 @@
    private PartyBuildingService partyBuildingService;
    @Resource
    private UserService userService;
    @Resource
    private CheckService checkService;
    @ApiOperation(value = "分页党建动态/政策文件",response =PartyBuildingComPbDynVO.class )
    @PostMapping("pagedynamic")
@@ -156,6 +159,11 @@
    @ApiOperation(value = "创建党员活动")
    @PostMapping("activityinfo")
    public R addActivityinfo(@RequestBody @Validated(AddGroup.class) ComPbActivityDTO comPbActivityDTO) {
        //        微信内容审核
        String msg = comPbActivityDTO.getRichText();
        if (!checkService.checkMessage(msg)) {
            return R.fail("内容违规");
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long userId = loginUserInfo.getUserId();
        Long communityId = loginUserInfo.getCommunityId();
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO;
import com.panzhihua.common.model.vos.community.*;
import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO;
@@ -47,6 +48,8 @@
    private CommunityService communityService;
    @Resource
    private PartyBuildingService partyBuildingService;
    @Resource
    private CheckService checkService;
    @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class)
    @GetMapping("info")
@@ -278,6 +281,11 @@
    @ApiOperation(value = "意见反馈" )
    @PostMapping("feedback")
    public R addFeedback(@RequestBody @Validated(AddGroup.class) SysUserFeedbackDTO sysUserFeedbackDTO) {
        //        微信内容审核
        String msg = sysUserFeedbackDTO.getContent();
        if (!checkService.checkMessage(msg)) {
            return R.fail("内容违规");
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long userId = loginUserInfo.getUserId();
        Long communityId = loginUserInfo.getCommunityId();
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/weixin/CheckService.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.applets.weixin;
import cn.binarywang.wx.miniapp.api.WxMaSecCheckService;
import com.panzhihua.applets.config.WxMaConfiguration;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 微信内容审查
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2021-02-25 10:57
 **/
@Slf4j
@Service
public class CheckService {
    @Resource
    private WxMaConfiguration wxMaConfiguration;
    public boolean checkMessage(String msg){
        WxMaSecCheckService wxMaSecCheckService=wxMaConfiguration.getMaService().getSecCheckService();
        try {
            boolean b = wxMaSecCheckService.checkMessage(msg);
            return b;
        } catch (WxErrorException e) {
            log.error("微信审核文字内容出错【{}】",e.getMessage());
            e.printStackTrace();
        }
        return false;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.java
@@ -20,5 +20,8 @@
    @ApiModelProperty("跳转内容")
    private String jumpContent;
    @ApiModelProperty("是否默认 0 否 1 是")
    private Integer isDefault;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.java
@@ -20,5 +20,8 @@
    @ApiModelProperty("跳转内容")
    private String jumpContent;
    @ApiModelProperty("是否默认  0 否 1 是")
    private Integer isDefault;
}
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvJumpDO.java
@@ -25,5 +25,10 @@
     * 跳转内容
     */
    private String jumpContent;
    /**
     * 是否默认 0 否 1是
     * 默认不能删除
     */
    private  Integer isDefault;
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -1126,6 +1126,7 @@
    public R addFeedback(SysUserFeedbackDTO sysUserFeedbackDTO) {
        SysUserFeedbackDO sysUserFeedbackDO=new SysUserFeedbackDO();
        BeanUtils.copyProperties(sysUserFeedbackDTO,sysUserFeedbackDO);
        sysUserFeedbackDO.setPhotoPath(sysUserFeedbackDTO.getPhotoPah());
        int insert = sysUserFeedbackDAO.insert(sysUserFeedbackDO);
        if (insert>0) {
            return R.ok();