| | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.CommonDTO; |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.NoticeUnReadVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserAgreementVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | |
| | | @ApiOperation(value = "分页展示社区随手拍",response = ComActEasyPhotoVO.class) |
| | | @PostMapping("pageeasyphoto") |
| | | public R pageEasyPhoto (@RequestBody ComActEasyPhotoVO comActEasyPhotoVO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | } |
| | | comActEasyPhotoVO.setCommunityId(communityId); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | return communityService.pageEasyPhotoApplets(comActEasyPhotoVO); |
| | | } |
| | | |
| | |
| | | return communityService.addEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询随手拍是否有活动",response = ComActEasyPhotoActivityVO.class) |
| | | @PostMapping("getEasyPhotoActivity") |
| | | public R getEasyPhotoActivity (@RequestBody CommonDTO commonDTO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | Long communityId = commonDTO.getCommunityId(); |
| | | if(loginUserInfo != null){ |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getEasyPhotoActivity(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情",response =ComActEasyPhotoVO.class ) |
| | | @GetMapping("detaileasyphoto") |
| | | @ApiImplicitParam(name = "id",value = "随手拍主键") |
| | | public R detailEasyPhoto (@RequestParam("id") Long id){ |
| | | Long userId = this.getUserId(); |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailEasyPhoto(id,userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍--评论--分页查询",response = ComActEasyPhotoCommentVO.class ) |
| | | @PostMapping("pagecomacteasyphotocomment") |
| | | public R pageComActEasyPhotoComment (@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO){ |
| | | pageComActEasyPhotoCommentDTO.setUserId(this.getUserId()); |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | pageComActEasyPhotoCommentDTO.setUserId(userId); |
| | | return communityService.pageComActEasyPhotoComment(pageComActEasyPhotoCommentDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页展示社区微心愿",response = ComActMicroWishVO.class) |
| | | @PostMapping("pagemicrowish") |
| | | public R pageMicroWish (@RequestBody ComActMicroWishVO comActMicroWishVO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());//责任人暂时放登录用户id |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comActMicroWishVO.setCommunityId(communityId); |
| | | comActMicroWishVO.setIsApplets(1); |
| | | comActMicroWishVO.setResponsibleId(userId);//责任人暂时放登录用户id |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | return communityService.pageMicroWish(comActMicroWishVO); |
| | | } |
| | |
| | | @GetMapping("microwish") |
| | | @ApiImplicitParam(name = "id",value = "微心愿主键") |
| | | public R detailMicroWish (@RequestParam("id")Long id){ |
| | | Long userId = this.getUserId(); |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailMicroWish(id,userId); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "首页广告banner",response = ComOpsAdvVO.class) |
| | | @GetMapping("listadvertisement") |
| | | @GetMapping("listadvertisement/noToken") |
| | | public R listAdvertisement (){ |
| | | return communityService.listAdvertisement(); |
| | | } |
| | |
| | | comActMessageVO.setUserId(userId); |
| | | comActMessageVO.setUserName(loginUserInfo.getName()); |
| | | comActMessageVO.setUserAccount(loginUserInfo.getAccount()); |
| | | comActMessageVO.setUserPhone(loginUserInfo.getPhone()); |
| | | comActMessageVO.setIspublic(1); |
| | | comActMessageVO.setStatus(1); |
| | | return communityService.addMessage(comActMessageVO); |
| | |
| | | public R isShop(){ |
| | | return R.ok(Constants.IS_SHOP_OPEN); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取最新活动和用户最新收益",response =ComActEasyPhotoRewardVO.class ) |
| | | @GetMapping("getUserReward") |
| | | public R getUserReward(@RequestParam("communityId") Long communityId){ |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getUserReward(userId,communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "读取用户随手拍奖励") |
| | | @PostMapping("readUserReward") |
| | | public R readUserReward(){ |
| | | return communityService.readUserReward(this.getUserId(),this.getCommunityId()); |
| | | } |
| | | } |