From b2fce0dc7dc4ea5dec9792a2bc3ceb9d33d6e07b Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期一, 04 九月 2023 13:59:52 +0800 Subject: [PATCH] 修改后台社区动态加载不出来 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java index b944b4f..bb6d38a 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java @@ -4,13 +4,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.entity.ComActSocialProjectPublicity; import com.panzhihua.service_community.dao.ComActSocialProjectPublicityDao; +import com.panzhihua.service_community.model.dos.ComActDO; import com.panzhihua.service_community.service.ComActSocialProjectPublicityService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; + +import static java.util.Objects.nonNull; /** * 项目宣传表(ComActSocialProjectPublicity)表服务实现类 @@ -24,8 +28,21 @@ @Resource private ComActSocialProjectPublicityDao comActSocialProjectPublicityDao; + @Resource + private ComActDAO comActDAO; @Override public R pageList(CommonPage commonPage) { + if (nonNull(commonPage.getCommunityId())) { + ComActDO comActDO = comActDAO.selectById(commonPage.getCommunityId()); + if (nonNull(comActDO)) { + commonPage.setStreetId(comActDO.getStreetId()); + } + } return R.ok(comActSocialProjectPublicityDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); } + + @Override + public R selectOne(Long id) { + return R.ok(comActSocialProjectPublicityDao.selectOne(id)); + } } -- Gitblit v1.7.1