From 56e2dc02ca5f4cf38308f8a1389322639f89e99e Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 17 十一月 2022 16:01:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 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 e0ba75a..ce7841d 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,7 +166,15 @@ @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); + ComEvent comEvent=new ComEvent(); + BeanUtils.copyProperties(comEventVO, comEvent); + log.info("==================参数vo"+comEventVO); + log.info("==================参数comEvent"+comEvent); + LoginUserInfoVO loginUserInfo = getLoginUserInfo(); + if (isNull(comEventVO.getAppId())){ + String appId = userService.detailUser(loginUserInfo.getUserId()).getData().getAppId(); + comEvent.setAppId(appId); + } return comEventService.pageByComEvent(comEvent, pagination,this.getLoginUserInfo()); } @@ -355,4 +373,12 @@ return comEventService.listCommunityScreen(); } + /** + * 获取事件范围筛选列表 + * */ + @GetMapping("/rangeList") + public R rangeList(){ + return comSanShuoExpertService.rangeList(); + } + } -- Gitblit v1.7.1