| | |
| | | import com.panzhihua.common.service.community.ComActEasyPhotoEvaluateFeign; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | import io.swagger.annotations.Api; |
| | |
| | | public R pageEasyPhoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | // comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember()); |
| | | } |
| | | 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("上传随手拍") |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 随手拍删除 |
| | | * |
| | | * @param id |
| | | * 随手拍主键 |
| | | * 登录用户id |
| | | * @return 详情内容 |
| | | */ |
| | | @ApiOperation(value = "删除随手拍", response = ComActEasyPhotoVO.class) |
| | | @DeleteMapping("easyphoto/{id}") |
| | | public R deleteEasyPhoto(@PathVariable("id") Long id) { |
| | | Long userId = this.getUserId(); |
| | | return communityService.deleteEasyPhoto(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") |
| | | public R pageComActEasyPhotoComment(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) { |
| | |
| | | } |
| | | pageComActEasyPhotoCommentDTO.setUserId(userId); |
| | | 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 = "随手拍--评论--新增评论") |
| | |
| | | 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()); |
| | |
| | | |
| | | @ApiOperation(value = "分页展示社区微心愿", response = ComActMicroWishVO.class) |
| | | @PostMapping("pagemicrowish") |
| | | public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) |
| | | { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id |
| | | } |
| | | |
| | | if(!StringUtils.isEmpty(comActMicroWishVO.getHandleId())) |
| | | { |
| | | comActMicroWishVO.setCommunityId(null); |
| | | } |
| | | comActMicroWishVO.setIsApplets(1); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | 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.setIsApplets(1); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | return communityService.pageMicroWishApplets(comActMicroWishVO); |
| | | return communityService.pageMicroWishAppletsDesensitize(comActMicroWishVO); |
| | | } |
| | | |
| | | @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(); |
| | |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailMicroWish(id, userId); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除心愿") |
| | | @PostMapping("deletemicrowish") |
| | | public R deleteMicrowish(@RequestParam("id") Long id) { |
| | | return communityService.deletemicrowish(id); |
| | | } |
| | | |
| | | |
| | | @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() { |
| | |
| | | whistleDto.setUserId(this.getUserId()); |
| | | return easyPhotoEvaluateFeign.evaluateEasyApplets(whistleDto); |
| | | } |
| | | |
| | | |
| | | |
| | | /***************************************************************************************************************** |
| | | * |
| | | * 社区宣传 |
| | | * |
| | | ******************************************************************************************************************/ |
| | | @ApiOperation(value = "获取社区宣传", response = CommunityPublicityVO.class) |
| | | @GetMapping("/getCommunityPublicityData") |
| | | public R getCommunityPublicityData(@RequestParam("communityId") String communityId) |
| | | { |
| | | return communityService.getCommunityPublicityData(communityId); |
| | | } |
| | | |
| | | |
| | | // @ApiOperation(value = "添加社区宣传") |
| | | // @PostMapping("/addCommunityPublicityDate") |
| | | // public R addCommunityPublicityDate(@RequestBody CommunityPublicityVO item) |
| | | // { |
| | | // return communityService.addCommunityPublicityDate(item); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "编辑社区宣传") |
| | | // @PostMapping("/editCommunityPublicityDate") |
| | | // public R editCommunityPublicityDate(@RequestBody CommunityPublicityVO item) |
| | | // { |
| | | // return communityService.editCommunityPublicityDate(item); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "删除社区宣传") |
| | | // @DeleteMapping("/deleteCommunityPublicityData") |
| | | // public R deleteCommunityPublicityData(@RequestParam("communityId") String communityId) |
| | | // { |
| | | // return communityService.deleteCommunityPublicityData(communityId); |
| | | // } |
| | | // |
| | | // |
| | | |
| | | } |