| | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | if (null!=isMy&&isMy.intValue()==1) { |
| | | pageComActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | pageComActDiscussDTO.setLoginUserId(loginUserInfo.getUserId()); |
| | | return communityService.pageDiscussApplets(pageComActDiscussDTO); |
| | | } |
| | | |
| | |
| | | return communityService.putDiscussUser(comActDiscussUserDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-点赞、取消点赞") |
| | | @PutMapping("discusscommentuser") |
| | | public R putDiscussCommentUser(@RequestBody @Validated ComActDiscussCommentUserDTO comActDiscussUserDTO) { |
| | | comActDiscussUserDTO.setUserId(this.getUserId()); |
| | | return communityService.putDiscussCommentUser(comActDiscussUserDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-详情",response = ComActDiscussVO.class) |
| | | @GetMapping("discuss") |
| | | @ApiImplicitParam(name = "id",value = "一起议主键",required = true) |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | return communityService.detailDiscussApplets(id); |
| | | Long userId = this.getUserId(); |
| | | return communityService.detailDiscussApplets(id,userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-分页查询",response = ComActDiscussCommentVO.class) |
| | |
| | | if (null==id||0==id) { |
| | | return R.fail("一起议主键不能为空"); |
| | | } |
| | | pageComActDiscussCommentDTO.setLoginUserId(this.getUserId()); |
| | | return communityService.pageDiscussCommentApplets(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | |
| | | return communityService.addDiscussCommentBack(comActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-投票") |
| | | @GetMapping("discussoptionuser") |
| | | @ApiImplicitParam(name = "id",value = "一起议选项主键",required = true) |
| | | public R addDiscussOptionUser(@RequestParam("id") Long id) { |
| | | if (null==id||0==id) { |
| | | return R.fail("选项主键不能为空"); |
| | | } |
| | | ComActDiscussOptionUserDTO comActDiscussOptionUserDTO=new ComActDiscussOptionUserDTO(); |
| | | comActDiscussOptionUserDTO.setDiscussOptionId(id); |
| | | comActDiscussOptionUserDTO.setUserId(this.getUserId()); |
| | | return communityService.addDiscussOptionUser(comActDiscussOptionUserDTO); |
| | | } |
| | | |
| | | |
| | | |
| | | |