From 117b432ab279a1e198de63412919bb9a1c011fcf Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 06 九月 2021 18:42:33 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java index b862290..cde44a3 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java @@ -6,6 +6,10 @@ import javax.annotation.Resource; +import com.panzhihua.common.utlis.AgeUtils; +import com.panzhihua.common.utlis.StringUtils; +import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; +import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; @@ -41,9 +45,9 @@ @Resource ComActWorkGuideMaterialDAO workGuideMaterialDAO; @Resource - ComActDAO comActDAO; - @Resource private ComActWorkGuideClassifyDAO comActWorkGuideClassifyDAO; + @Resource + ComActDAO comActDAO; @Override public R addWorkGuide(ComActWorkGuideDTO workGuideDTO, Long userId) { @@ -152,6 +156,12 @@ page.setSize(pageSize); page.setCurrent(pageNum); IPage<ComActWorkGuideVO> iPage = this.baseMapper.pageWorkGuide(page, pageActWorkGuideDTO); + if (!iPage.getRecords().isEmpty()) { + iPage.getRecords().forEach(comActWorkGuideVO -> { + ComActWorkGuideClassifyDO comActWorkGuideClassifyDO = comActWorkGuideClassifyDAO.selectById(comActWorkGuideVO.getClassify()); + comActWorkGuideVO.setClassifyName(comActWorkGuideClassifyDO.getClassifyName()); + }); + } return R.ok(iPage); } -- Gitblit v1.7.1