| | |
| | | return communityService.pageDiscussApplets(pageComActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-分页查询-脱敏", response = ComActDiscussVO.class) |
| | | @PostMapping("pageDiscussDesensitize") |
| | | public R pageDiscussDesensitize(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | if (Objects.isNull(pageComActDiscussDTO.getType())) { |
| | | return R.fail("查询类型不能为空"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | pageComActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | pageComActDiscussDTO.setLoginUserId(loginUserInfo.getUserId()); |
| | | |
| | | Integer isMy = pageComActDiscussDTO.getIsMy(); |
| | | if (null != isMy && isMy.intValue() == 1) { |
| | | pageComActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | } |
| | | return communityService.pageDiscussAppletsDesensitize(pageComActDiscussDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "一起议-回复") |
| | | @PostMapping("discusscomment") |
| | | public R addDiscussComment(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) { |
| | |
| | | return communityService.detailDiscussApplets(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-详情-脱敏", response = ComActDiscussVO.class) |
| | | @GetMapping("discussDesensitize") |
| | | @ApiImplicitParam(name = "id", value = "一起议主键", required = true) |
| | | public R detailDiscussDesensitize(@RequestParam("id") Long id) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailDiscussAppletsDesensitize(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-分页查询", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("pagediscusscomment") |
| | | public R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | |
| | | return communityService.pageDiscussCommentApplets(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-分页查询-脱敏", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("pageDiscussCommentDesensitize") |
| | | public R pageDiscussCommentDesensitize(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Long id = pageComActDiscussCommentDTO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("一起议主键不能为空"); |
| | | } |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | pageComActDiscussCommentDTO.setLoginUserId(userId); |
| | | return communityService.pageDiscussCommentAppletsDesensitize(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-回复") |
| | | @PostMapping("discusscommentback") |
| | | public R addDiscussCommentBack(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) { |