From 9d627907c3db735a0671fc8fdd5ae8483be775a2 Mon Sep 17 00:00:00 2001
From: hhhyyq <hhhyyq@163.com>
Date: 星期三, 17 三月 2021 00:09:57 +0800
Subject: [PATCH] 房屋租售

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 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 520f97e..4e63028 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
@@ -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")
@@ -52,12 +55,18 @@
             return R.fail("用户未绑定社区");
         }
         comActEasyPhotoVO.setCommunityId(communityId);
+        comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId());
         return communityService.pageEasyPhotoApplets(comActEasyPhotoVO);
     }
 
     @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) {
@@ -135,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) {

--
Gitblit v1.7.1