From 3880af689ddab738d75a72c1e9870a9a0690919e Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期四, 12 五月 2022 11:13:15 +0800 Subject: [PATCH] 花城E+防疫修改 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java | 130 ++++++++++++++++++++++-------------------- 1 files changed, 68 insertions(+), 62 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java index 955a0a7..c602a97 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java @@ -2,22 +2,22 @@ import com.panzhihua.applets.weixin.CheckService; import com.panzhihua.common.constants.NeighborCircleConstants; +import javax.annotation.Resource; + +import com.panzhihua.common.model.vos.neighbor.*; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.web.bind.annotation.*; + import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.neighbor.*; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentReplyAppVO; import com.panzhihua.common.service.community.CommunityService; import com.panzhihua.common.utlis.StringUtils; + 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; /** * @auther lyq @@ -35,12 +35,11 @@ @Resource private CheckService checkService; - @ApiOperation(value = "分页查询邻里圈列表" , response = ComActNeighborCircleAppVO.class) + @ApiOperation(value = "分页查询邻里圈列表", response = ComActNeighborCircleAppVO.class) @PostMapping("pageApp") public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if(loginUserInfo != null){ - neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId()); + if (loginUserInfo != null) { neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); } return communityService.pageNeighborByApp(neighborCircleAppDTO); @@ -56,7 +55,7 @@ return R.fail("请重新登录"); } addNeighborCircleAppDTO.setUserId(userId); - if(StringUtils.isNotEmpty(loginUser.getPhone())){ + if (StringUtils.isNotEmpty(loginUser.getPhone())) { addNeighborCircleAppDTO.setPhone(this.getLoginUserInfo().getPhone()); } if(communityId != null){ @@ -81,8 +80,8 @@ addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); } }else{ - communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","2"); - addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); + communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","1"); + addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no); } }else{ addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); @@ -91,26 +90,26 @@ return communityService.addNeighborByApp(addNeighborCircleAppDTO); } - @ApiOperation(value = "查询邻里圈详情" , response = ComActNeighborCircleDetailAppVO.class) + @ApiOperation(value = "查询邻里圈详情", response = ComActNeighborCircleDetailAppVO.class) @PostMapping("detail") public R neighborDetailByApp(@RequestBody ComActNeighborCircleDetailAppDTO neighborCircleAppDTO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if(loginUserInfo != null){ + if (loginUserInfo != null) { neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); } -// Long userId = this.getLoginUserInfo().getUserId(); -// if(userId == null){ -// return R.fail("请先登录"); -// } -// neighborCircleAppDTO.setUserId(userId); + // Long userId = this.getLoginUserInfo().getUserId(); + // if(userId == null){ + // return R.fail("请先登录"); + // } + // neighborCircleAppDTO.setUserId(userId); return communityService.neighborDetailByApp(neighborCircleAppDTO); } - @ApiOperation(value = "分页查询用户邻里圈审核列表" , response = ComActNeighborCircleAppVO.class) + @ApiOperation(value = "分页查询用户邻里圈审核列表", response = ComActNeighborCircleAppVO.class) @PostMapping("user/page") public R neighborExamineByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { Long userId = this.getLoginUserInfo().getUserId(); - if(userId == null){ + if (userId == null) { return R.fail("请先登录"); } neighborCircleAppDTO.setUserId(userId); @@ -121,7 +120,7 @@ @PostMapping("fabulous") public R neighborFabulousByApp(@RequestBody ComActNeighborFabulousAppDTO fabulousAppDTO) { Long userId = this.getLoginUserInfo().getUserId(); - if(userId == null){ + if (userId == null) { return R.fail("请先登录"); } fabulousAppDTO.setUserId(userId); @@ -132,14 +131,14 @@ @PostMapping("forward") public R neighborForwardByApp(@RequestBody ComActNeighborForwardAppDTO forwardAppDTO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if(loginUserInfo != null){ + if (loginUserInfo != null) { forwardAppDTO.setUserId(loginUserInfo.getUserId()); } -// Long userId = this.getLoginUserInfo().getUserId(); -// if(userId == null){ -// return R.fail("请先登录"); -// } -// forwardAppDTO.setUserId(userId); + // Long userId = this.getLoginUserInfo().getUserId(); + // if(userId == null){ + // return R.fail("请先登录"); + // } + // forwardAppDTO.setUserId(userId); return communityService.neighborForwardByApp(forwardAppDTO); } @@ -147,7 +146,7 @@ @PostMapping("comment") public R neighborCommentByApp(@RequestBody ComActNeighborCommentAppDTO commentAppDTO) { Long userId = this.getLoginUserInfo().getUserId(); - if(userId == null){ + if (userId == null) { return R.fail("请先登录"); } commentAppDTO.setUserId(userId); @@ -158,7 +157,7 @@ @PostMapping("reply") public R neighborReplyByApp(@RequestBody ComActNeighborReplyAppDTO replyAppDTO) { Long userId = this.getLoginUserInfo().getUserId(); - if(userId == null){ + if (userId == null) { return R.fail("请先登录"); } replyAppDTO.setUserId(userId); @@ -169,7 +168,7 @@ @PostMapping("cancel/fabulous") public R neighborFabulousCancelByApp(@RequestBody ComActNeighborFabulousAppDTO fabulousAppDTO) { Long userId = this.getLoginUserInfo().getUserId(); - if(userId == null){ + if (userId == null) { return R.fail("请先登录"); } fabulousAppDTO.setUserId(userId); @@ -180,51 +179,33 @@ @PostMapping("add/browse") public R neighborAddBrowseByApp(@RequestBody ComActNeighborAddBrowseAppDTO addBrowseAppDTO) { Long userId = this.getLoginUserInfo().getUserId(); - if(userId == null){ + if (userId == null) { return R.fail("请先登录"); } addBrowseAppDTO.setUserId(userId); return communityService.neighborAddBrowseByApp(addBrowseAppDTO); } - @ApiOperation(value = "分页查询评论下所有回复",response = ComActNeighborCommentReplyAppVO.class) + @ApiOperation(value = "分页查询评论下所有回复", response = ComActNeighborCommentReplyAppVO.class) @PostMapping("comment/reply") public R neighborCommentReplyByApp(@RequestBody ComActNeighborCommentReplyAppDTO commentReplyAppDTO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if(loginUserInfo != null){ + if (loginUserInfo != null) { commentReplyAppDTO.setUserId(loginUserInfo.getUserId()); } -// Long userId = this.getLoginUserInfo().getUserId(); -// if(userId == null){ -// return R.fail("请先登录"); -// } -// 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) + @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class) @GetMapping("topic/list") - public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero) { - LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if(loginUserInfo != null){ - communityId = loginUserInfo.getCommunityId(); - } - if(isZero == null){ - isZero = 2; - } - return communityService.getNeighborTopicByApp(communityId,isZero); - } - - @ApiOperation(value = "用户新增邻里圈话题") - @PostMapping("topic/add") - public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO) { - LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if(loginUserInfo == null){ - return R.fail(401,"请先登录"); - } - circleTopicAppDTO.setUserId(loginUserInfo.getUserId()); - circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId()); - return communityService.addNeighborTopicByApp(circleTopicAppDTO); + public R getNeighborTopicByApp( + @RequestParam(value = "name",defaultValue = "",required = false) String name) { + return communityService.getNeighborTopicByApp(name); } @ApiOperation(value = "用户删除邻里圈") @@ -238,5 +219,30 @@ circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId()); return communityService.deleteNeighborByApp(circleTopicAppDTO); } + + /** + * 分页查询邻里圈列表 + * + * @param neighborCircleAppDTO + * 请求参数 + * @return 邻里圈列表 + */ + @ApiOperation(value = "新版接单问题",response =ComActNeighborCircleAppVO.class ) + @PostMapping("selectSolve") + public R selectSolve(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { + return communityService.selectSolve(neighborCircleAppDTO); + } + + + /** + * 修改数据 + * @param editNeighborCircleAdminVO + * @return + */ + @ApiOperation(value = "接单 反馈",response =ComActNeighborCircleAppVO.class ) + @PostMapping("update") + public R order(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO){ + return this.communityService.order(editNeighborCircleAdminVO); + } } -- Gitblit v1.7.1