From 82c69b99bb31dede23cde31eaf09f12f3e79f297 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期四, 24 八月 2023 16:58:49 +0800 Subject: [PATCH] 新增小程序积分列表 修改积分发放流程 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java index 7226f7a..58cecc0 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java @@ -10,15 +10,18 @@ import com.panzhihua.common.model.vos.sanshuo.ComEventConciliationVO; import com.panzhihua.common.model.vos.sanshuo.ComEventVO; import com.panzhihua.common.model.vos.sanshuo.ComSanRequestVO; +import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.CopyUtil; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.entity.ComEvent; +import com.panzhihua.service_community.service.ComSanShuoExpertService; import com.panzhihua.service_community.service.IComEventService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; @@ -29,6 +32,7 @@ import java.util.List; import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; /** * ClassName ComEventController @@ -45,6 +49,10 @@ @Resource private IComEventService comEventService; + @Resource + private UserService userService; + @Resource + private ComSanShuoExpertService comSanShuoExpertService; /** @@ -66,7 +74,9 @@ comEvent.setRequestUserId(loginUser.getUserId()); comEvent.setRequestUserName(loginUser.getName()); comEvent.setRequestUserTel(loginUser.getPhone()); - //comEvent.setAppId(loginUser.getAppId()); + if (isNull(comEventVO.getAppId())){ + comEvent.setAppId(loginUser.getAppId()); + } return comEventService.insertComEvent(comEvent); } @@ -156,8 +166,18 @@ @PostMapping("/page") public R page(@RequestBody ComEventVO comEventVO, Long pageNo, Long pageSize) { Page pagination = new Page(pageNo, pageSize); - ComEvent comEvent = CopyUtil.copyProperties(comEventVO, ComEvent.class); - return comEventService.pageByComEvent(comEvent, pagination,this.getLoginUserInfo()); + ComEvent comEvent=new ComEvent(); + BeanUtils.copyProperties(comEventVO, comEvent); + LoginUserInfoVO loginUserInfo = getLoginUserInfo(); + if (isNull(comEventVO.getAppId())){ +// String appId = userService.detailUser(loginUserInfo.getUserId()).getData().getAppId(); + String appId = getAppId(); + comEvent.setAppId(appId); + } +// LoginUserInfoVO loginUserInfo1 = this.getLoginUserInfo(); +// loginUserInfo1.setType(userService.detailUser(loginUserInfo.getUserId()).getData().getType()); +// loginUserInfo1.setType(loginUserInfo.getType()); + return comEventService.pageByComEvent(comEvent, pagination,loginUserInfo); } @@ -316,8 +336,10 @@ */ @ApiOperation("事件各种状态(处理状态1待处理2待验证3专家已受理4专家未受理,拒绝5调解中6已结案归档7调解取消8 已删除)数据统计") @GetMapping("/status/calculate") - public R calculate() { - return comEventService.calculate(getLoginUserInfo()); + public R calculate(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "id",required = false)Long id) { + LoginUserInfoVO loginUserInfo = getLoginUserInfo(); +// loginUserInfo.setType(userService.detailUser(loginUserInfo.getUserId()).getData().getType()); + return comEventService.calculate(loginUserInfo,level,id); } /** @@ -355,4 +377,12 @@ return comEventService.listCommunityScreen(); } + /** + * 获取事件范围筛选列表 + * */ + @GetMapping("/rangeList") + public R rangeList(){ + return comSanShuoExpertService.rangeList(); + } + } -- Gitblit v1.7.1