| | |
| | | @ApiOperation(value = "分页获取社区动态",response = ComActDynVO.class) |
| | | @PostMapping("pagedynamic") |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO){ |
| | | Long communityId = this.getCommunityId(); |
| | | comActDynVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comActDynVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | comActDynVO.setIsTopping(null); |
| | | comActDynVO.setStatus(1); |
| | | return communityService.pageDynamic(comActDynVO); |
| | |
| | | @ApiOperation(value = "分页查询社区活动",response = ComActActivityVO.class) |
| | | @PostMapping("pageactivity") |
| | | public R pageActivity(@RequestBody ComActActivityVO comActActivityVO){ |
| | | Long communityId = this.getCommunityId(); |
| | | comActActivityVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comActActivityVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | comActActivityVO.setIsApplets(1); |
| | | Integer status = comActActivityVO.getStatus(); |
| | | if (null!=status&&status.intValue()==4) { |
| | |
| | | @ApiOperation(value = "分页查询志愿者团队",response = ComMngVolunteerMngVO.class) |
| | | @PostMapping("pagevolunteer") |
| | | public R pageVolunteer(@RequestBody @Validated(PageGroup.class) PageVolunteerDTO pageVolunteerDTO){ |
| | | Long communityId = this.getCommunityId(); |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comMngVolunteerMngVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | |
| | | // comMngVolunteerMngVO.setCommunityId(communityId); |
| | | comMngVolunteerMngVO.setPageNum(pageVolunteerDTO.getPageNum()); |
| | | comMngVolunteerMngVO.setPageSize(pageVolunteerDTO.getPageSize()); |
| | | return communityService.pageVolunteer(comMngVolunteerMngVO); |
| | |
| | | @ApiOperation(value = "分页查询便民服务商家",response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/area/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null!=communityId && 0!=communityId) { |
| | | comCvtBusinessAppletsDTO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comCvtBusinessAppletsDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return communityService.pageComCvtBusinessByServiceArea(comCvtBusinessAppletsDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.StreetAllAppletsVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/switch/") |
| | | @Api(tags = {"切换社区模块"}) |
| | | public class CommunitySwitchApi { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "查询所有社区",response = StreetAllAppletsVO.class ) |
| | | @GetMapping("/list/noToken") |
| | | public R list(){ |
| | | return communityService.communitySwitchList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据名字搜索社区",response = CommunitySwitchAllAppletsVO.class ) |
| | | @GetMapping("/search/noToken") |
| | | public R search(@RequestParam(value = "name") String name){ |
| | | return communityService.communitySwitchSearchList(name); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据距离搜索社区",response = CommunitySwitchAllAppletsVO.class ) |
| | | @PostMapping("/distance/noToken") |
| | | public R searchDistance(@RequestBody SearchCommunityDTO communityDTO){ |
| | | return communityService.communitySwitchSearchDistanceList(communityDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @ApiOperation(value = "一起议-分页查询",response = ComActDiscussVO.class) |
| | | @PostMapping("pagediscuss") |
| | | public R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | 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()); |
| | | } |
| | | pageComActDiscussDTO.setLoginUserId(loginUserInfo.getUserId()); |
| | | } |
| | | return communityService.pageDiscussApplets(pageComActDiscussDTO); |
| | | } |
| | | |
| | |
| | | @GetMapping("discuss") |
| | | @ApiImplicitParam(name = "id",value = "一起议主键",required = true) |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | Long userId = this.getUserId(); |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailDiscussApplets(id,userId); |
| | | } |
| | | |
| | |
| | | if (null==id||0==id) { |
| | | return R.fail("一起议主键不能为空"); |
| | | } |
| | | pageComActDiscussCommentDTO.setLoginUserId(this.getUserId()); |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | pageComActDiscussCommentDTO.setLoginUserId(userId); |
| | | return communityService.pageDiscussCommentApplets(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "房屋租售-分页查询",response = ComOpsHouseVO.class) |
| | | @PostMapping("pagehouse") |
| | | public R pageHouse(@RequestBody PageComOpsHouseDTO pageComOpsHouseDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | Integer isMy = pageComOpsHouseDTO.getIsMy(); |
| | | if (null!=isMy&&isMy.intValue()==1) { |
| | | if (null!=isMy&&isMy.equals(1)) { |
| | | pageComOpsHouseDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | return communityService.pageOpsHouse(pageComOpsHouseDTO); |
| | |
| | | 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; |
| | |
| | | @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("用户未绑定社区"); |
| | | } |
| | | comActEasyPhotoVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | } |
| | | return communityService.pageEasyPhotoApplets(comActEasyPhotoVO); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "查询随手拍是否有活动",response = ComActEasyPhotoActivityVO.class) |
| | | @PostMapping("getEasyPhotoActivity") |
| | | public R getEasyPhotoActivity (){ |
| | | Long communityId = this.getCommunityId(); |
| | | public R getEasyPhotoActivity (@RequestBody CommonDTO commonDTO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | Long communityId = commonDTO.getCommunityId(); |
| | | if(loginUserInfo != null){ |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getEasyPhotoActivity(communityId); |
| | | } |
| | | |
| | |
| | | @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(); |
| | | } |
| | |
| | | @ApiOperation(value = "分页查询邻里圈列表" , response = ComActNeighborCircleAppVO.class) |
| | | @PostMapping("pageApp") |
| | | public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先绑定社区"); |
| | | } |
| | | neighborCircleAppDTO.setCommunityId(communityId); |
| | | |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId != null){ |
| | | neighborCircleAppDTO.setUserId(userId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | return communityService.pageNeighborByApp(neighborCircleAppDTO); |
| | | } |
| | |
| | | @ApiOperation(value = "查询邻里圈详情" , response = ComActNeighborCircleDetailAppVO.class) |
| | | @PostMapping("detail") |
| | | public R neighborDetailByApp(@RequestBody ComActNeighborCircleDetailAppDTO neighborCircleAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | return R.fail("请先登录"); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | neighborCircleAppDTO.setUserId(userId); |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // neighborCircleAppDTO.setUserId(userId); |
| | | return communityService.neighborDetailByApp(neighborCircleAppDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "邻里圈转发") |
| | | @PostMapping("forward") |
| | | public R neighborForwardByApp(@RequestBody ComActNeighborForwardAppDTO forwardAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | return R.fail("请先登录"); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | forwardAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | forwardAppDTO.setUserId(userId); |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // forwardAppDTO.setUserId(userId); |
| | | return communityService.neighborForwardByApp(forwardAppDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询评论下所有回复",response = ComActNeighborCommentReplyAppVO.class) |
| | | @PostMapping("comment/reply") |
| | | public R neighborCommentReplyByApp(@RequestBody ComActNeighborCommentReplyAppDTO commentReplyAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | return R.fail("请先登录"); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | commentReplyAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | commentReplyAppDTO.setUserId(userId); |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // commentReplyAppDTO.setUserId(userId); |
| | | return communityService.neighborCommentReplyByApp(commentReplyAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区邻里圈话题列表" , response = ComActNeighborCircleTopicAppVO.class) |
| | | @GetMapping("topic/list") |
| | | public R getNeighborTopicByApp() { |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先绑定社区"); |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getNeighborTopicByApp(communityId); |
| | | } |
| | |
| | | @ApiOperation(value = "分页党建动态/政策文件",response =PartyBuildingComPbDynVO.class ) |
| | | @PostMapping("pagedynamic") |
| | | public R pageYnamic(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO){ |
| | | Long communityId = this.getCommunityId(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | partyBuildingComPbDynVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | Integer type = partyBuildingComPbDynVO.getType(); |
| | | if (ObjectUtils.isEmpty(type)) { |
| | | return R.fail("类型不能为空"); |
| | | } |
| | | partyBuildingComPbDynVO.setCommunityId(communityId); |
| | | partyBuildingComPbDynVO.setStatus(2); |
| | | return partyBuildingService.pageYnamic(partyBuildingComPbDynVO); |
| | | } |
| | |
| | | @ApiOperation(value = "分页查询党员活动",response = PageActivityMembersVO.class) |
| | | @PostMapping("pageactivity") |
| | | public R pageActivity(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyBuildingActivityVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | partyBuildingActivityVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | // partyBuildingActivityVO.setCommunityId(communityId); |
| | | Integer status = partyBuildingActivityVO.getStatus(); |
| | | if (null!=status&&status.intValue()==4) { |
| | | partyBuildingActivityVO.setIsAppliets(1); |
| | |
| | | if (ObjectUtils.isEmpty(id)||0==id) { |
| | | return R.fail("主键id不能为空"); |
| | | } |
| | | Long userId = this.getUserId(); |
| | | Long userId = null; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | |
| | | PartyBuildingComPbDynVO partyBuildingComPbDynVO=JSONObject.parseObject(JSONObject.toJSONString(r.getData()),PartyBuildingComPbDynVO.class); |
| | | if(userId != null){ |
| | | ComPbDynUserVO comPbDynUserVO=new ComPbDynUserVO(); |
| | | comPbDynUserVO.setCreateAt(new Date()); |
| | | comPbDynUserVO.setDynId(id); |
| | | comPbDynUserVO.setUserId(userId); |
| | | R r1 = partyBuildingService.addDynUser(comPbDynUserVO); |
| | | PartyBuildingComPbDynVO partyBuildingComPbDynVO=JSONObject.parseObject(JSONObject.toJSONString(r.getData()),PartyBuildingComPbDynVO.class); |
| | | if (R.isOk(r1)) { |
| | | partyBuildingComPbDynVO.setIsAdd(1); |
| | | }else{ |
| | | partyBuildingComPbDynVO.setIsAdd(0); |
| | | } |
| | | }else{ |
| | | partyBuildingComPbDynVO.setIsAdd(0); |
| | | } |
| | |
| | | @ApiOperation(value = "分页党委查询",response =PartyCommitteeVO.class ) |
| | | @PostMapping("pagepartycommittee") |
| | | public R pagePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | Long communityId =this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | // Long communityId =this.getCommunityId(); |
| | | // partyCommitteeVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | partyCommitteeVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return partyBuildingService.pagePartyCommittee(partyCommitteeVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询服务团队成员",response = ComPbServiceTeamVO.class) |
| | | @PostMapping("pageserviceteam") |
| | | public R pageServiceTeam(@RequestBody PageComPbServiceTeamDTO pageComPbServiceTeamDTO) { |
| | | pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId()); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | pageComPbServiceTeamDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId()); |
| | | return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO); |
| | | } |
| | | |
| | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | |
| | | |
| | | @ApiOperation(value = "办事指南_详情",response = ComActWorkGuideVO.class) |
| | | @GetMapping("detailworkguide") |
| | | public R detailWorkGuide(@RequestParam("workGuideId")Long workGuideId) { |
| | | Long conmunityId = this.getLoginUserInfo().getCommunityId(); |
| | | public R detailWorkGuide(@RequestParam("workGuideId")Long workGuideId,@RequestParam(value = "conmunityId",required = false)Long communityId) { |
| | | Long conmunityId = communityId; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | conmunityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.detailWorkGuide(workGuideId, conmunityId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("公共请求参数请求参数") |
| | | public class CommonDTO { |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.switchs; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("搜索社区请求参数") |
| | | public class SearchCommunityDTO { |
| | | |
| | | @ApiModelProperty(value = "纬度",required = true) |
| | | private String latitude; |
| | | |
| | | @ApiModelProperty(value = "经度",required = true) |
| | | private String longitude; |
| | | |
| | | @ApiModelProperty(value = "距离(千米)",required = true) |
| | | private Integer distance; |
| | | } |
| | |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("是否点赞 1 是 0 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 0; |
| | | |
| | | @ApiModelProperty("回复内容") |
| | | private String commentBack; |
| | |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("是否已经投票 1 是 0 否") |
| | | private Integer haveVote; |
| | | private Integer haveVote = 0; |
| | | } |
| | |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("是否已经点赞 1 是 0 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 0; |
| | | |
| | | @ApiModelProperty("是否已经投票 1 是 0 否") |
| | | private Integer haveVote; |
| | | private Integer haveVote = 0; |
| | | |
| | | @ApiModelProperty("用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台") |
| | | private Integer userType; |
| | |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("会否已经点赞 1 是 0 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 0; |
| | | } |
| | |
| | | private Integer isHide; |
| | | |
| | | @ApiModelProperty("是否点赞 0 否 1 是") |
| | | private Integer haveGiveThumbsUp; |
| | | private Integer haveGiveThumbsUp = 0; |
| | | |
| | | @ApiModelProperty(value = "是否需要反馈 1 是 0 不是",example = "0") |
| | | private Integer isNeedFeedBack; |
| | |
| | | private Integer isApplets; |
| | | |
| | | @ApiModelProperty(value = "是否点赞 1 是 0 不是",example = "1") |
| | | private Integer haveGiveThumbsUp; |
| | | private Integer haveGiveThumbsUp = 0; |
| | | |
| | | @ApiModelProperty(value = "登录用户",hidden = true) |
| | | private Long userId; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.switchs; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("切换社区模块-所有社区数据") |
| | | public class CommunitySwitchAllAppletsVO { |
| | | |
| | | @ApiModelProperty("街道id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("街道名称") |
| | | private String streetName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.switchs; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("切换社区模块-所有社区数据") |
| | | public class StreetAllAppletsVO { |
| | | |
| | | @ApiModelProperty("街道id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty("街道名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("街道下社区列表") |
| | | private List<CommunitySwitchAllAppletsVO> childList; |
| | | |
| | | } |
| | |
| | | * 是否已经点赞 1 是 2 否 |
| | | */ |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 2; |
| | | |
| | | /** |
| | | * 发布类型(1.小程序发布 2.后台发布) |
| | |
| | | * 是否已经点赞 1 是 2 否 |
| | | */ |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 2; |
| | | |
| | | } |
| | |
| | | * 是否已经点赞 1 是 2 否 |
| | | */ |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 2; |
| | | |
| | | } |
| | |
| | | * 是否已经点赞 1 是 2 否 |
| | | */ |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 2; |
| | | |
| | | /** |
| | | * 发布类型(1.小程序发布 2.后台发布) |
| | |
| | | * 是否已经点赞 1 是 2 否 |
| | | */ |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | private Integer haveSign = 2; |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.EditComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.*; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | |
| | | @PostMapping("timedTaskActivityNotice") |
| | | R timedTaskActivityNotice(); |
| | | |
| | | /** |
| | | * 查询社区所有列表 |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/switch/community/all/list") |
| | | R communitySwitchList(); |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | | * @param name 社区名字 |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/switch/community/search/list") |
| | | R communitySwitchSearchList(@RequestParam(value = "name") String name); |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | | * @param communityDTO 请求参数 |
| | | * @return 社区列表 |
| | | */ |
| | | @PostMapping("/switch/community/search/distance/list") |
| | | R communitySwitchSearchDistanceList(@RequestBody SearchCommunityDTO communityDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/switch/") |
| | | public class CommunitySwitchApi { |
| | | |
| | | @Resource |
| | | private ComActService comActService; |
| | | |
| | | /** |
| | | * 查询社区所有列表 |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/community/all/list") |
| | | public R getCommunityAllList() { |
| | | return comActService.getCommunityAllList(); |
| | | } |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | | * @param name 社区名字 |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/community/search/list") |
| | | public R communitySwitchSearchList(@RequestParam(value = "name") String name) { |
| | | return comActService.communitySwitchSearchList(name); |
| | | } |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | | * @param communityDTO 请求参数 |
| | | * @return 社区列表 |
| | | */ |
| | | @PostMapping("/community/search/distance/list") |
| | | public R communitySwitchSearchDistanceList(@RequestBody SearchCommunityDTO communityDTO) { |
| | | return comActService.communitySwitchSearchDistanceList(communityDTO); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComPopulationActVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.StreetAllAppletsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridCommunityAdminVO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | "left join com_street as cs on cs.street_id = ca.street_id\n" + |
| | | "where ca.community_id = #{communityId}") |
| | | ComPopulationActVO getPopulationActById(@Param("communityId")Long communityId); |
| | | |
| | | @Select("select `name`,street_id from com_street") |
| | | List<StreetAllAppletsVO> getStreetList(); |
| | | |
| | | @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca left join com_street as cs on cs.street_id = ca.street_id where ca.state = 0 and ca.street_id = #{streetId}") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByStreetId(@Param("streetId")Long streetId); |
| | | |
| | | @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca left join com_street as cs on cs.street_id = ca.street_id\n" + |
| | | " where ca.state = 0 and ca.name like concat('%',#{name},'%')") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByName(@Param("name")String name); |
| | | |
| | | @Select("SELECT" + |
| | | " c.community_id, " + |
| | | " c.`name`, " + |
| | | " c.street_id, " + |
| | | " cs.`name` as streetName, " + |
| | | " round( ST_Distance_Sphere ( Point ( #{communityDTO.longitude}, #{communityDTO.latitude} ), Point ( c.lng, c.lat ) )/ 1000, 2 ) AS distance " + |
| | | "FROM " + |
| | | " com_act c " + |
| | | " left join com_street as cs on cs.street_id = c.street_id " + |
| | | " HAVING distance >= 0 and distance <= #{communityDTO.distance} " + |
| | | "ORDER BY " + |
| | | " distance ASC") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO); |
| | | } |
| | |
| | | "if(u.type=1,u.name,a.name) userName, " + |
| | | "if(u.type=1,u.nick_name,a.name) userNickName, " + |
| | | "if(du.id is not null,1,0) haveSign, " + |
| | | "<if test='pageComActDiscussDTO.loginUserId != null '>" + |
| | | "if(ou.id is not null,1,0) haveVote, " + |
| | | " </if> " + |
| | | "u.image_url, " + |
| | | "d.create_at " + |
| | | "FROM " + |
| | |
| | | "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " + |
| | | "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id " + |
| | | "LEFT JOIN com_act_discuss_option do ON d.id = do.discuss_id " + |
| | | "<if test='pageComActDiscussDTO.loginUserId != null '>" + |
| | | "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} " + |
| | | " </if> " + |
| | | " where d.community_id=#{pageComActDiscussDTO.communityId}" + |
| | | "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" + |
| | | " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("select * from (" + |
| | | @Select("<script> " + |
| | | "select * from (" + |
| | | "SELECT \n" + |
| | | "m.id,\n" + |
| | | "m.`comment`,\n" + |
| | |
| | | "e.`nick_name`,\n" + |
| | | "e.image_url url,\n" + |
| | | "m.create_at,\n" + |
| | | "<if test='comActEasyPhotoCommentDTO.userId != null'>" + |
| | | "if(u1.id is null,0,1)haveSign,\n" + |
| | | "</if> " + |
| | | "COUNT(u.id)num\n" + |
| | | "FROM\n" + |
| | | "com_act_easy_photo_comment m \n" + |
| | | "JOIN sys_user e on m.user_id=e.user_id\n" + |
| | | "LEFT JOIN com_act_easy_photo_comment_user u on m.id=u.easy_photo_comment_id\n" + |
| | | "<if test='comActEasyPhotoCommentDTO.userId != null'>" + |
| | | "LEFT JOIN com_act_easy_photo_comment_user u1 on m.id=u1.easy_photo_comment_id and u1.user_id=#{comActEasyPhotoCommentDTO.userId}\n" + |
| | | "</if> " + |
| | | "where m.easy_photo_id=#{comActEasyPhotoCommentDTO.id} " + |
| | | "GROUP BY m.id\n" + |
| | | " )t order by t.num desc, t.create_at DESC ") |
| | | " )t order by t.num desc, t.create_at DESC </script>") |
| | | IPage<ComActEasyPhotoCommentVO> pageComActEasyPhotoComment(Page page, @Param("comActEasyPhotoCommentDTO") PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO); |
| | | |
| | | |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageFeedBackDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | R getCommunityLists(); |
| | | |
| | | /** |
| | | * 查询社区所有列表 |
| | | * @return 社区列表 |
| | | */ |
| | | R getCommunityAllList(); |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | | * @param name 社区名字 |
| | | * @return 社区列表 |
| | | */ |
| | | R communitySwitchSearchList(String name); |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | | * @param communityDTO 请求参数 |
| | | * @return 社区列表 |
| | | */ |
| | | R communitySwitchSearchDistanceList(SearchCommunityDTO communityDTO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(comActDiscussOptionDO,comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | |
| | | if(loginUserId != null){ |
| | | //判断选项是否已投票 |
| | | int haveVote=comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(),loginUserId); |
| | | comActDiscussOptionVO.setHaveVote(haveVote>0?1:0); |
| | | } |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | } |
| | | |
| | | if(loginUserId != null){ |
| | | Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()).eq(ComActDiscussUserDO::getUserId, loginUserId)); |
| | | if (integer>0) { |
| | | comActDiscussVO.setHaveSign(1); |
| | |
| | | // 判断是否已经投票 |
| | | int haveVote=comActDiscussOptionUserDAO.selectHaveVote(id,loginUserId); |
| | | comActDiscussVO.setHaveVote(haveVote>0?1:0); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | |
| | | comActDiscussCommentVO1.setUserNameBack(userName); |
| | | comActDiscussCommentVO1.setUserNickNameBack(userNickName); |
| | | } |
| | | if(pageComActDiscussCommentDTO.getLoginUserId() != null && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)){ |
| | | Integer integer = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda().eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO1.getId()).eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer>0) { |
| | | comActDiscussCommentVO1.setHaveSign(1); |
| | | }else { |
| | | comActDiscussCommentVO1.setHaveSign(0); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | comActDiscussCommentVO.setComActDiscussCommentVOList(comActDiscussCommentVOList); |
| | | } |
| | | if(pageComActDiscussCommentDTO.getLoginUserId() != null && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)){ |
| | | Integer integer = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda().eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO.getId()).eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer>0) { |
| | | comActDiscussCommentVO.setHaveSign(1); |
| | | }else { |
| | | comActDiscussCommentVO.setHaveSign(0); |
| | | } |
| | | } |
| | | |
| | | //判断当前评论是否是社区管理员评论 |
| | |
| | | ComActDiscussOptionVO comActDiscussOptionVO=new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO,comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | if(loginUserId != null && !loginUserId.equals(0L)){ |
| | | //判断选项是否已投票 |
| | | int haveVote=comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(),loginUserId); |
| | | comActDiscussOptionVO.setHaveVote(haveVote>0?1:0); |
| | | } |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | |
| | | ComActVO comActVO=comActDiscussDAO.selectCommunity(communityId); |
| | | comActDiscussVO.setUserName(comActVO.getName()); |
| | | } |
| | | if(loginUserId != null && !loginUserId.equals(0L)){ |
| | | ComActDiscussVO comActDiscussVO1=comActDiscussDAO.selectHaveSignAndHaveVote(id,loginUserId); |
| | | comActDiscussVO.setHaveSign(comActDiscussVO1.getHaveSign()); |
| | | comActDiscussVO.setHaveVote(comActDiscussVO1.getHaveVote()); |
| | | } |
| | | |
| | | return R.ok(comActDiscussVO); |
| | | } |
| | | |
| | |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoVO)||null== status) { |
| | | return R.fail("随手拍不存在"); |
| | | } |
| | | if(!userId.equals(0L)){ |
| | | ComActEasyPhotoUserDO comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | |
| | | if (status.intValue()==4) { |
| | |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActEasyPhotoVO> iPage = comActEasyPhotoDAO.pageEasyPhotoApplets(page, comActEasyPhotoVO); |
| | | List<ComActEasyPhotoVO> records = iPage.getRecords(); |
| | | if(userId != null){ |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActEasyPhotoVO1 -> { |
| | | Long id = comActEasyPhotoVO1.getId(); |
| | |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActMicroWishVO> iPage = comActMicroWishDAO.pageMicroWish(page, comActMicroWishVO); |
| | | |
| | | List<ComActMicroWishVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMicroWishVO1 -> { |
| | | if(userId != null){ |
| | | Long id = comActMicroWishVO1.getId(); |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id) |
| | | .eq(ComActMicroWishUserDO::getUserId, userId)); |
| | |
| | | } else { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | if (ObjectUtils.isEmpty(comActMicroWishVO)) { |
| | | return R.fail("心愿不存在"); |
| | | } |
| | | if(userId != null){ |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getUserId, userId).eq(ComActMicroWishUserDO::getMicroWishId, id)); |
| | | if (ObjectUtils.isEmpty(comActMicroWishUserDO)) { |
| | | comActMicroWishVO.setHaveGiveThumbsUp(0); |
| | | }else { |
| | | comActMicroWishVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | comActMicroWishVO.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO.getSponsorPhone())); |
| | | return R.ok(comActMicroWishVO); |
| | | } |
| | |
| | | IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO); |
| | | if(!doPager.getRecords().isEmpty()){ |
| | | for (ComActNeighborCircleAppVO circleAppVO:doPager.getRecords()) { |
| | | if(neighborCircleAppDTO.getUserId() != null){ |
| | | //查询点赞信息 |
| | | ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne( |
| | | new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleAppVO.getId()) |
| | |
| | | circleAppVO.setHaveSign(1); |
| | | }else{ |
| | | circleAppVO.setHaveSign(2); |
| | | } |
| | | } |
| | | |
| | | if(circleAppVO.getType() != null && circleAppVO.getType().equals(ComActNeighborCircleDO.type.admin)){ |
| | |
| | | } |
| | | } |
| | | |
| | | if(neighborCircleAppDTO.getUserId() != null){ |
| | | //查询邻里圈点赞信息 |
| | | ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne( |
| | | new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleDetailAppVO.getId()) |
| | |
| | | }else{ |
| | | circleDetailAppVO.setHaveSign(2); |
| | | } |
| | | } |
| | | |
| | | |
| | | //查询邻里圈下评论列表 |
| | | IPage<ComActNeighborCircleCommentAppVO> circleCommentAppPage = comActNeighborCircleCommentDAO.pageNeighborCommentByApp( |
| | | new Page(neighborCircleAppDTO.getPageNum(),neighborCircleAppDTO.getPageSize()),neighborCircleAppDTO); |
| | | if(!circleCommentAppPage.getRecords().isEmpty()){ |
| | | for (ComActNeighborCircleCommentAppVO circleCommentVo:circleCommentAppPage.getRecords()) { |
| | | |
| | | if(neighborCircleAppDTO.getUserId() != null){ |
| | | //查询点赞信息 |
| | | ComActNeighborCircleFabulousDO circleCommentFabulousDO = comActNeighborCircleFabulousDAO.selectOne( |
| | | new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleCommentVo.getId()) |
| | |
| | | }else{ |
| | | circleCommentVo.setHaveSign(2); |
| | | } |
| | | } |
| | | |
| | | //查询评论下评论回复 |
| | | List<ComActNeighborCircleCommentReplyAppVO> commentReplyAppVOS = comActNeighborCircleCommentReplyDAO.getCircleCommentReplyList(circleCommentVo.getId()); |
| | | if(!commentReplyAppVOS.isEmpty()){ |
| | | List<ComActNeighborCircleCommentReplyAppVO> newCommentReplyAppVOS = new ArrayList<>(); |
| | | if(neighborCircleAppDTO.getUserId() != null){ |
| | | int i = 0; |
| | | for (ComActNeighborCircleCommentReplyAppVO commentReplyVO:commentReplyAppVOS) { |
| | | if(i >= 2){ |
| | |
| | | } |
| | | newCommentReplyAppVOS.add(commentReplyVO); |
| | | i++; |
| | | } |
| | | } |
| | | circleCommentVo.setCircleCommentReplyAppList(newCommentReplyAppVOS); |
| | | circleCommentVo.setCommentReplyNum(commentReplyAppVOS.size()); |
| | |
| | | @Override |
| | | public R neighborForwardByApp(ComActNeighborForwardAppDTO forwardAppDTO){ |
| | | |
| | | if(forwardAppDTO.getUserId() != null){ |
| | | //添加邻里圈浏览记录 |
| | | comActNeighborCircleBrowseService.addBrowseRecord(forwardAppDTO.getCircleId(),forwardAppDTO.getUserId()); |
| | | } |
| | | |
| | | ComActNeighborCircleDO circleDO = this.baseMapper.selectById(forwardAppDTO.getCircleId()); |
| | | if(circleDO == null){ |
| | |
| | | new Page<>(commentReplyAppDTO.getPageNum(),commentReplyAppDTO.getPageSize()),commentReplyAppDTO.getCommentId()); |
| | | if(!neighborCircleIPage.getRecords().isEmpty()){ |
| | | for (ComActNeighborCommentReplyAppVO commentReplyAppVO:neighborCircleIPage.getRecords()) { |
| | | if(commentReplyAppDTO.getUserId() != null){ |
| | | //查询点赞信息 |
| | | ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne( |
| | | new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,commentReplyAppVO.getId()) |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok(neighborCircleIPage); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageFeedBackDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.StreetAllAppletsVO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComActVillageDAO; |
| | | import com.panzhihua.service_community.dao.ComStreetDAO; |
| | |
| | | return R.ok(this.comActDAO.getCommunityLists()); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区所有列表 |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R getCommunityAllList(){ |
| | | //查询街道列表 |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(); |
| | | streetList.forEach(street -> { |
| | | //查询街道下社区列表 |
| | | List<CommunitySwitchAllAppletsVO> communityList = this.comActDAO.getCommunityListByStreetId(street.getStreetId()); |
| | | if(!communityList.isEmpty()){ |
| | | street.setChildList(communityList); |
| | | } |
| | | }); |
| | | return R.ok(streetList); |
| | | } |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | | * @param name 社区名字 |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R communitySwitchSearchList(String name){ |
| | | return R.ok(this.comActDAO.getCommunityListByName(name)); |
| | | } |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | | * @param communityDTO 请求参数 |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R communitySwitchSearchDistanceList(SearchCommunityDTO communityDTO){ |
| | | return R.ok(this.comActDAO.getCommunityListByNearby(communityDTO)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | List<String> noLoginUrl = new ArrayList<>(); |
| | | noLoginUrl.add("/api/applets/community/detaildynamic"); |
| | | noLoginUrl.add("/api/applets/community/detailactivity"); |
| | | noLoginUrl.add("/api/applets/community/pagedynamic"); |
| | | noLoginUrl.add("/api/applets/community/pageactivity"); |
| | | noLoginUrl.add("/api/applets/community/listactivitysign"); |
| | | noLoginUrl.add("/api/applets/workguide/pageworkguide"); |
| | | noLoginUrl.add("/api/applets/workguide/detailworkguide"); |
| | | noLoginUrl.add("/api/applets/partybuilding/pagedynamic"); |
| | | noLoginUrl.add("/api/applets/partybuilding/infodynamic"); |
| | | noLoginUrl.add("/api/applets/convenient/business/area/page"); |
| | | noLoginUrl.add("/api/applets/convenient/business/get"); |
| | | noLoginUrl.add("/api/applets/pagehouse"); |
| | | noLoginUrl.add("/api/applets/house"); |
| | | noLoginUrl.add("/api/applets/index/agreement"); |
| | | noLoginUrl.add("/api/applets/index/pageeasyphoto"); |
| | | noLoginUrl.add("/api/applets/index/getEasyPhotoActivity"); |
| | | noLoginUrl.add("/api/applets/index/detaileasyphoto"); |
| | | noLoginUrl.add("/api/applets/index/pagecomacteasyphotocomment"); |
| | | noLoginUrl.add("/api/applets/index/pagemicrowish"); |
| | | noLoginUrl.add("/api/applets/index/microwish"); |
| | | noLoginUrl.add("/api/applets/pagediscuss"); |
| | | noLoginUrl.add("/api/applets/discuss"); |
| | | noLoginUrl.add("/api/applets/pagediscusscomment"); |
| | | noLoginUrl.add("/api/applets/neighbor/pageApp"); |
| | | noLoginUrl.add("/api/applets/neighbor/detail"); |
| | | noLoginUrl.add("/api/applets/neighbor/forward"); |
| | | noLoginUrl.add("/api/applets/partybuilding/pageserviceteam"); |
| | | noLoginUrl.add("/api/applets/partybuilding/pagepartycommittee"); |
| | | noLoginUrl.add("/api/applets/partybuilding/pageactivity"); |
| | | noLoginUrl.add("/api/applets/community/pagevolunteer"); |
| | | noLoginUrl.add("/api/applets/community/volunteer"); |
| | | if(noLoginUrl.contains(requestURI)){ |
| | | List<SimpleGrantedAuthority> authorities = new ArrayList<>(); |
| | | authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); |