| | |
| | | return communityService.pageEasyPhotoApplets(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页展示社区随手拍-脱敏", response = ComActEasyPhotoVO.class) |
| | | @PostMapping("pageEasyPhotoDesensitize") |
| | | public R pageEasyPhotoDesensitize(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember()); |
| | | } |
| | | return communityService.pageEasyPhotoAppletsDesensitize(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation("上传随手拍") |
| | | @PostMapping("easyphoto") |
| | | public R addEasyPhoto(@RequestBody @Validated(AddGroup.class) ComActEasyPhotoVO comActEasyPhotoVO) { |
| | |
| | | if (StrUtil.isNotBlank(detail)) { |
| | | String result = checkService.checkMessageBy(detail, openid, appId); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息"); |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | |
| | |
| | | String photoPathList = comActEasyPhotoVO.getPhotoPathList(); |
| | | if (StrUtil.isNotBlank(photoPathList)) { |
| | | if (!checkService.checkImageBy(photoPathList, appId)) { |
| | | return R.fail(Constants.NOTICE_FAIL, "上传图片存在违规信息"); |
| | | return R.fail(501, "上传图片存在违规信息"); |
| | | } |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | } |
| | | return communityService.detailEasyPhoto(id, userId); |
| | | } |
| | | @ApiOperation(value = "随手拍详情-脱敏", response = ComActEasyPhotoVO.class) |
| | | @GetMapping("detailEasyPhotoDesensitize") |
| | | @ApiImplicitParam(name = "id", value = "随手拍主键") |
| | | public R detailEasyPhotoDesensitize(@RequestParam("id") Long id) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailEasyPhotoDesensitize(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍--评论--分页查询", response = ComActEasyPhotoCommentVO.class) |
| | | @PostMapping("pagecomacteasyphotocomment") |
| | |
| | | return communityService.pageComActEasyPhotoComment(pageComActEasyPhotoCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍--评论--分页查询-脱敏", response = ComActEasyPhotoCommentVO.class) |
| | | @PostMapping("pageComActEasyPhotoCommentDesensitize") |
| | | public R pageComActEasyPhotoCommentDesensitize(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | pageComActEasyPhotoCommentDTO.setUserId(userId); |
| | | return communityService.pageComActEasyPhotoCommentDesensitize(pageComActEasyPhotoCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍--评论--新增评论") |
| | | @PostMapping("comacteasyphotocomment") |
| | | public R addComActEasyPhotoComment(@RequestBody ComActEasyPhotoCommentDTO comActEasyPhotoCommentDTO) { |
| | |
| | | if (StrUtil.isNotBlank(comment)) { |
| | | String result = checkService.checkMessageBy(comment, openid, appId); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息"); |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | comActEasyPhotoCommentDTO.setUserId(this.getUserId()); |
| | |
| | | return communityService.pageMicroWishApplets(comActMicroWishVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页展示社区微心愿-脱敏", response = ComActMicroWishVO.class) |
| | | @PostMapping("pageMicroWishDesensitize") |
| | | public R pageMicroWishDesensitize(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id |
| | | } |
| | | comActMicroWishVO.setIsApplets(1); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | return communityService.pageMicroWishAppletsDesensitize(comActMicroWishVO); |
| | | } |
| | | |
| | | @ApiOperation("发布微心愿") |
| | | @PostMapping("microwish") |
| | | public R addMicroWish(@RequestBody @Validated(AddGroup.class) ComActMicroWishVO comActMicroWishVO) { |
| | |
| | | if (StrUtil.isNotBlank(msg)) { |
| | | String result = checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(),this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息"); |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailMicroWish(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "心愿详情-脱敏", response = ComActMicroWishVO.class) |
| | | @GetMapping("microwishDesensitize") |
| | | @ApiImplicitParam(name = "id", value = "微心愿主键") |
| | | public R detailMicroWishDesensitize(@RequestParam("id") Long id) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailMicroWishDesensitize(id, userId); |
| | | } |
| | | |
| | | @ApiOperation("点赞/取消点赞微心愿") |
| | |
| | | if (StrUtil.isNotBlank(msg)) { |
| | | String result = checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(),this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息"); |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | if (StrUtil.isNotBlank(msg)) { |
| | | String result = checkService.checkMessageBy(msg, this.getLoginUserInfo().getOpenid(),this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息"); |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | return communityService.getUserRewards(userId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取普达首页弹窗接口", response = ComActEasyPhotoRewardVO.class) |
| | | @GetMapping("getUserRewardsNew") |
| | | public R getUserRewardsNew(@RequestParam("communityId") Long communityId) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getUserRewardsNew(userId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "读取用户随手拍奖励") |
| | | @PostMapping("readUserReward") |
| | | public R readUserReward() { |