From ce34fb4b611a61885c7146e8d776c758b3f366fe Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期五, 08 七月 2022 10:11:06 +0800
Subject: [PATCH] 问题清单bug处理
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectServiceImpl.java | 44 ++++++++++++++++++++++++++------------------
1 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectServiceImpl.java
index d48c0c0..b6159c34 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectServiceImpl.java
@@ -7,9 +7,11 @@
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.social.SocialProjectVO;
+import com.panzhihua.service_community.dao.ComActDAO;
import com.panzhihua.service_community.entity.ComActSocialProject;
import com.panzhihua.service_community.dao.ComActSocialProjectDao;
import com.panzhihua.service_community.entity.ProjectRelationVO;
+import com.panzhihua.service_community.model.dos.ComActDO;
import com.panzhihua.service_community.service.ComActSocialProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@@ -29,8 +31,16 @@
@Resource
private ComActSocialProjectDao comActSocialProjectDao;
+ @Resource
+ private ComActDAO comActDAO;
@Override
public R pageList(CommonPage commonPage) {
+ if(commonPage.getParamId2()!=null){
+ ComActDO comActDO=comActDAO.selectById(commonPage.getCommunityId());
+ if(comActDO!=null){
+ commonPage.setStreetId(comActDO.getStreetId());
+ }
+ }
return R.ok(comActSocialProjectDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage));
}
@@ -43,32 +53,30 @@
}
@Override
+ public R getByBackstage(Long id) {
+ return R.ok(comActSocialProjectDao.getByApplet(id));
+ }
+
+ @Override
public R getProject(CommonPage commonPage) {
if(commonPage.getParamId()==null){
return R.fail("数据异常");
}
ProjectRelationVO projectRelationVO=new ProjectRelationVO();
- ComActSocialProject comActSocialProject=this.comActSocialProjectDao.selectById(commonPage.getParamId());
- if(comActSocialProject.getLevel()==1){
- ComActSocialProject comActSocialProject1=this.comActSocialProjectDao.selectOne(new QueryWrapper<ComActSocialProject>().lambda().eq(ComActSocialProject::getId,comActSocialProject.getParentId()));
- if(comActSocialProject1!=null){
- SocialProjectVO socialProjectVO=new SocialProjectVO();
- BeanUtils.copyProperties(comActSocialProject1,socialProjectVO);
- projectRelationVO.setFatherProjectLevelOne(socialProjectVO);
- }
-
- }
+ SocialProjectVO comActSocialProject=this.comActSocialProjectDao.selectByLevel(commonPage.getParamId());
if(comActSocialProject.getLevel()==2){
- ComActSocialProject comActSocialProject1=this.comActSocialProjectDao.selectOne(new QueryWrapper<ComActSocialProject>().lambda().eq(ComActSocialProject::getId,comActSocialProject.getParentId()));
+ SocialProjectVO comActSocialProject1=this.comActSocialProjectDao.selectByLevel(comActSocialProject.getParentId());
if(comActSocialProject1!=null){
- SocialProjectVO socialProjectVO=new SocialProjectVO();
- BeanUtils.copyProperties(comActSocialProject1,socialProjectVO);
- projectRelationVO.setFatherProjectLevelTwo(socialProjectVO);
- ComActSocialProject comActSocialProject2=this.comActSocialProjectDao.selectOne(new QueryWrapper<ComActSocialProject>().lambda().eq(ComActSocialProject::getId,comActSocialProject1.getParentId()));
+ projectRelationVO.setFatherProjectLevelOne(comActSocialProject1);
+ }
+ }
+ if(comActSocialProject.getLevel()==3){
+ SocialProjectVO comActSocialProject1=this.comActSocialProjectDao.selectByLevel(comActSocialProject.getParentId());
+ if(comActSocialProject1!=null){
+ projectRelationVO.setFatherProjectLevelTwo(comActSocialProject1);
+ SocialProjectVO comActSocialProject2=this.comActSocialProjectDao.selectByLevel(comActSocialProject1.getParentId());
if(comActSocialProject2!=null){
- SocialProjectVO socialProjectVO1=new SocialProjectVO();
- BeanUtils.copyProperties(comActSocialProject2,socialProjectVO1);
- projectRelationVO.setFatherProjectLevelOne(socialProjectVO1);
+ projectRelationVO.setFatherProjectLevelOne(comActSocialProject2);
}
}
}
--
Gitblit v1.7.1