From 5c2ed14a85491746f55da8b72f53425b16891c11 Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期五, 22 七月 2022 16:25:22 +0800 Subject: [PATCH] bug修改 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java | 72 +++++++++++++++++++++-------------- 1 files changed, 43 insertions(+), 29 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 d79aa0f..e10e280 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 @@ -4,22 +4,22 @@ 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 static java.util.Objects.isNull; /** * @auther lyq @@ -42,7 +42,7 @@ public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); if (loginUserInfo != null) { - neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId()); + neighborCircleAppDTO.setPhone(loginUserInfo.getPhone()); neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); } return communityService.pageNeighborByApp(neighborCircleAppDTO); @@ -206,30 +206,10 @@ @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class) @GetMapping("topic/list") - public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId - ,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero - ,@RequestParam(value = "belongType",defaultValue = "1",required = false) Integer belongType - ,@RequestParam(value = "name",defaultValue = "",required = false) String name) { - LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); - if (loginUserInfo != null) { - communityId = loginUserInfo.getCommunityId(); - } - if(isZero == null){ - isZero = 2; - } - return communityService.getNeighborTopicByApp(communityId,isZero,name,belongType); - } - - @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, + @RequestParam(value = "belongType", defaultValue = "1", required = false) Integer belongType) { + return communityService.getNeighborTopicByApp(name, belongType); } @ApiOperation(value = "用户删除邻里圈") @@ -243,5 +223,39 @@ circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId()); return communityService.deleteNeighborByApp(circleTopicAppDTO); } + + /** + * 分页查询邻里圈列表 + * + * @param neighborCircleAppDTO + * 请求参数 + * @return 邻里圈列表 + */ + @ApiOperation(value = "新版接单问题",response =ComActNeighborCircleAppVO.class ) + @PostMapping("selectSolve") + public R selectSolve(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { + neighborCircleAppDTO.setUserId(this.getUserId()); + 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); + } + + @ApiOperation(value = "服务统计",response = ServiceStaticsVO.class) + @PostMapping("/serviceStatic") + public R serviceStatic(@RequestBody ServiceStaticDTO serviceStaticDTO){ + return this.communityService.serviceStatic(serviceStaticDTO); + } + + } -- Gitblit v1.7.1