From c75bae7dfa4639260b16e3d4d3476c6eac09333f Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Wed, 27 Sep 2023 15:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E7=82=B9=E6=9C=80=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E6=96=87=E7=AB=A0=E5=A2=9E=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=8A=E4=BC=A0=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SysContentServiceImpl.java | 18 ++++++++++++++---- .../huoran/iasf/vo/resp/PageContentRespVO.java | 5 ++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java index 1b4478b..0c5ecb1 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java @@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.huoran.iasf.common.utils.Constant; import com.huoran.iasf.common.utils.R; import com.huoran.iasf.entity.SysContent; +import com.huoran.iasf.entity.SysContentFile; +import com.huoran.iasf.mapper.SysContentFileMapper; import com.huoran.iasf.mapper.SysContentMapper; import com.huoran.iasf.service.SysContentService; import com.huoran.iasf.vo.req.ArticleModifiedSortReq; @@ -39,6 +41,8 @@ public class SysContentServiceImpl extends ServiceImpl page = new Page(reqVO.getPageNum(), reqVO.getPageSize()); IPage pageList = baseMapper.getPublishedArticles(page, reqVO); + + + for (PageContentRespVO vo : pageList.getRecords()) { + List fileList = fileMapper.getFileByContentId(vo.getId()); + vo.setFileList(fileList); + } return R.success(pageList); } @@ -182,10 +192,10 @@ public class SysContentServiceImpl extends ServiceImpl sequenceNumber) { //改大 gt > updateWrapper1.setSql(" sequence = sequence + 1"); diff --git a/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java b/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java index 17a3c08..ecf4950 100644 --- a/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java +++ b/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java @@ -2,6 +2,7 @@ package com.huoran.iasf.vo.resp; import com.baomidou.mybatisplus.annotation.*; import com.huoran.iasf.entity.SysColumn; +import com.huoran.iasf.entity.SysContentFile; import com.huoran.iasf.vo.FatherContentRespVO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -246,5 +247,7 @@ public class PageContentRespVO { @ApiModelProperty(value = "荣誉") private String honor; - + @ApiModelProperty(value = "文章附件") + @TableField(exist = false) + List fileList; } \ No newline at end of file