| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.neighbor.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.neighbor.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | Long communityId = loginUser.getCommunityId(); |
| | | if(userId == null){ |
| | | return R.fail("请重新登录"); |
| | | } |
| | | String releaseContent = addNeighborCircleAppDTO.getReleaseContent(); |
| | | if (StrUtil.isNotBlank(releaseContent)) { |
| | | String result = checkService.checkMessageBy(releaseContent, this.getLoginUserInfo().getOpenid(), this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail("填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | String releaseImages = addNeighborCircleAppDTO.getReleaseImages(); |
| | | if (StrUtil.isNotBlank(releaseImages)) { |
| | | if (checkService.checkImageBy(releaseImages, this.getAppId())) { |
| | | return R.fail("上传图片存在违规信息"); |
| | | } |
| | | } |
| | | addNeighborCircleAppDTO.setUserId(userId); |
| | | if (StringUtils.isNotEmpty(loginUser.getPhone())) { |
| | |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | String content = commentAppDTO.getContent(); |
| | | if (StrUtil.isNotBlank(content)) { |
| | | String result = checkService.checkMessageBy(content, this.getLoginUserInfo().getOpenid(), this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail("填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | commentAppDTO.setUserId(userId); |
| | | return communityService.neighborCommentByApp(commentAppDTO); |
| | | } |
| | |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | String content = replyAppDTO.getContent(); |
| | | if (StrUtil.isNotBlank(content)) { |
| | | String result = checkService.checkMessageBy(content, this.getLoginUserInfo().getOpenid(), this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail("填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | replyAppDTO.setUserId(userId); |
| | | return communityService.neighborReplyByApp(replyAppDTO); |
| | |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | | * |
| | | * @param neighborCircleAppDTO |
| | | * 请求参数 |
| | | * @param neighborCircleAppDTO 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @ApiOperation(value = "新版接单问题",response =ComActNeighborCircleAppVO.class ) |
| | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param editNeighborCircleAdminVO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 求助我的问题数量统计 |
| | | * |
| | | * @param type |
| | | * @param phone |
| | | * @return |