From 452488703f6e585d0ce97993b1b09f60272cc071 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 25 Nov 2022 10:17:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BE=9D=E6=8D=AE=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iasf/controller/SysColumnController.java | 47 +++++++++- .../controller/SysTemplateController.java | 35 +++++--- .../huoran/iasf/entity/SysTemplateStyle.java | 5 +- .../huoran/iasf/mapper/SysColumnMapper.java | 3 + .../huoran/iasf/mapper/SysContentMapper.java | 4 + .../iasf/mapper/xml/SysColumnMapper.xml | 71 ++++++++++++--- .../iasf/mapper/xml/SysContentMapper.xml | 88 +++++++++---------- .../huoran/iasf/service/SysColumnService.java | 3 + .../iasf/service/SysTemplateStyleService.java | 2 + .../service/impl/SysColumnServiceImpl.java | 5 ++ .../service/impl/SysContentServiceImpl.java | 8 +- .../huoran/iasf/vo/req/PageContentReqVO.java | 6 ++ .../iasf/vo/resp/PageContentRespVO.java | 8 ++ .../com/company/project/CodeGenerator.java | 2 +- 14 files changed, 207 insertions(+), 80 deletions(-) diff --git a/src/main/java/com/huoran/iasf/controller/SysColumnController.java b/src/main/java/com/huoran/iasf/controller/SysColumnController.java index e20947b..c4c60ea 100644 --- a/src/main/java/com/huoran/iasf/controller/SysColumnController.java +++ b/src/main/java/com/huoran/iasf/controller/SysColumnController.java @@ -26,6 +26,7 @@ import com.huoran.iasf.service.SysColumnService; import javax.validation.Valid; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.List; @@ -70,6 +71,10 @@ public class SysColumnController { @PostMapping("/save") @ApiOperation(value = "新增", response = SysColumn.class) public R save(@RequestBody @Valid SysColumn sysColumn) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("father_id", sysColumn.getFatherId()); + Integer count = service.count(queryWrapper); + sysColumn.setSort(count+1); boolean addState = service.save(sysColumn); return addState ? R.success(sysColumn.getId()) : R.fail("新增失败"); } @@ -87,7 +92,7 @@ public class SysColumnController { boolean delState = service.removeById(id); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("column_id",id); + queryWrapper.in("column_id", id); //删除栏目后删除栏目下的文章 List contentId = contentService.list(queryWrapper); contentService.removeByIds(contentId); @@ -100,7 +105,7 @@ public class SysColumnController { public R batchDeletion(@ApiParam(name = "ids", value = "主键", required = true) @RequestParam List ids) { boolean delState = service.removeByIds(ids); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("column_id",ids); + queryWrapper.in("column_id", ids); //删除栏目后删除栏目下的文章 contentService.remove(queryWrapper); return delState ? R.success() : R.fail("删除失败"); @@ -135,5 +140,43 @@ public class SysColumnController { return R.success(); } + + @ApiOperation("获取一级下的子级栏目(包含自己)") + @PostMapping("/getsTheSubColumn") + public R getsTheSubColumn(Integer id) { + + //1 创建list集合,用于封装所有删除菜单id值 + List idList = new ArrayList<>(); + //2 向idList集合设置删除菜单id + this.selectCategoryChildById(id + "", idList);//找到当前菜单的子菜单 把结果id封装到idlist里面去 + //把当前id封装到list里面 + idList.add(id);//现在把当前id封装进去 之前都是子菜单的id + String str = ""; + for (Integer idstr : idList) { + str += idstr + ","; + } + String ids = str.substring(0, str.length() - 1); + + return service.getsTheSubColumn(id, ids); + + } + + public void selectCategoryChildById(String id, List idList) { + //查询菜单里面子菜单id + QueryWrapper wrapper = new QueryWrapper(); + wrapper.eq("father_id", id); + wrapper.eq("deleted", Constant.DATA_NOT_DELETED); + wrapper.select("id");//我们只想查询id 所以只需要查询指定列的值 + List childIdList = service.list(wrapper);//当前菜单的所有子菜单 + //把childIdList里面菜单id值获取出来,封装idList里面,做递归查询 + childIdList.stream().forEach(item -> {//遍历集合得到每一个对象item + //封装idList里面 + idList.add(item.getId()); + //递归查询 + this.selectCategoryChildById(item.getId() + "", idList); + }); + } + + } diff --git a/src/main/java/com/huoran/iasf/controller/SysTemplateController.java b/src/main/java/com/huoran/iasf/controller/SysTemplateController.java index b943e78..c164ef4 100644 --- a/src/main/java/com/huoran/iasf/controller/SysTemplateController.java +++ b/src/main/java/com/huoran/iasf/controller/SysTemplateController.java @@ -3,6 +3,8 @@ package com.huoran.iasf.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.huoran.iasf.common.utils.Constant; import com.huoran.iasf.entity.SysTemplateStyle; +import com.huoran.iasf.entity.SysTemplateStyleConfiguration; +import com.huoran.iasf.service.SysTemplateStyleConfigurationService; import com.huoran.iasf.service.SysTemplateStyleService; import io.swagger.annotations.*; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -41,12 +43,13 @@ public class SysTemplateController { @Autowired public SysTemplateStyleService styleService; - + @Autowired + public SysTemplateStyleConfigurationService templateStyleConfigurationService; @PostMapping("/listOfColumnTemplates") @ApiOperation(value = "获取文章模板列表、详情样式", response = SysTemplate.class) public R listOfColumnTemplates() { - List list = templateService.list(new QueryWrapper().eq("type",1)); + List list = templateService.list(new QueryWrapper().eq("type", 1)); return R.success(list); } @@ -54,7 +57,7 @@ public class SysTemplateController { @PostMapping("/longPageListStyle") @ApiOperation(value = "长页列表样式", response = SysTemplate.class) public R longPageListStyle() { - List list = styleService.list(new QueryWrapper().eq("template_id",9)); + List list = styleService.list(new QueryWrapper().eq("is_long_page", 1)); return R.success(list); } @@ -62,28 +65,28 @@ public class SysTemplateController { @ApiOperation(value = "根据模板id获取样式", response = SysTemplateStyle.class) public R theTemplateIdGetsTheStyle(@ApiParam(name = "templateId", value = "模板id", required = true) @RequestParam Integer templateId) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("template_id",templateId); + /*QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("type", Constant.LIST_TEMPLATE_TYPES); + queryWrapper.eq("is_long_page", 0); List listingTemplateTypes = styleService.list(queryWrapper); QueryWrapper queryWrapper1 = new QueryWrapper<>(); queryWrapper1.eq("template_id",templateId); queryWrapper1.eq("type", Constant.DETAILS_TEMPLATE_TYPE); - List detailsTypeOfTheTemplate = styleService.list(queryWrapper1); + List detailsTypeOfTheTemplate = styleService.list(queryWrapper1);*/ + List listingTemplateTypes = templateStyleConfigurationService.getsTheStyleUnderTheTemplate(templateId, 0); + List detailsTypeOfTheTemplate = templateStyleConfigurationService.getsTheStyleUnderTheTemplate(templateId, 1); - Map map = new HashMap<>(); - map.put("listingTemplateTypes",listingTemplateTypes);//列表样式 - map.put("detailsTypeOfTheTemplate",detailsTypeOfTheTemplate);//详情样式 + + Map map = new HashMap<>(); + map.put("listingTemplateTypes", listingTemplateTypes);//列表样式 + map.put("detailsTypeOfTheTemplate", detailsTypeOfTheTemplate);//详情样式 return R.success(map); } - - - @PostMapping("/fullDetailsTemplateStyle") @ApiOperation(value = "全部详情模板样式", response = SysTemplateStyle.class) public R fullDetailsTemplateStyle() { @@ -93,5 +96,13 @@ public class SysTemplateController { List listingTemplateTypes = styleService.list(queryWrapper); return R.success(listingTemplateTypes); } + + + @PostMapping("/individualTemplateDetailsStyle") + @ApiOperation(value = "独立模板详情样式", response = SysTemplate.class) + public R individualTemplateDetailsStyle() { + List list = styleService.list(new QueryWrapper().eq("type", 1).eq("is_long_page", 0)); + return R.success(list); + } } diff --git a/src/main/java/com/huoran/iasf/entity/SysTemplateStyle.java b/src/main/java/com/huoran/iasf/entity/SysTemplateStyle.java index dc49b03..41552df 100644 --- a/src/main/java/com/huoran/iasf/entity/SysTemplateStyle.java +++ b/src/main/java/com/huoran/iasf/entity/SysTemplateStyle.java @@ -35,13 +35,12 @@ public class SysTemplateStyle implements Serializable { @ApiModelProperty(value = "样式名称") private String style; - @ApiModelProperty(value = "模板id") - private Integer templateId; @ApiModelProperty(value = "跳转路径") private String path; - + @ApiModelProperty(value = "是否为长页") + private Integer isLongPage; } diff --git a/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java b/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java index 09df759..e9ec93a 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java @@ -2,6 +2,7 @@ package com.huoran.iasf.mapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huoran.iasf.common.utils.R; import com.huoran.iasf.entity.SysColumn; import com.huoran.iasf.vo.FatherContentRespVO; import com.huoran.iasf.vo.req.LongPageColumnReqVO; @@ -32,4 +33,6 @@ public interface SysColumnMapper extends BaseMapper { //依据子级查询父级 List getParentInformationBasedOnChild(@Param("id")Integer id); + + List getsTheSubColumn(@Param("parentId")Integer parentId ,@Param("ids")String ids); } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java b/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java index 8bedc5a..d61fc62 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java @@ -9,6 +9,8 @@ import org.apache.ibatis.annotations.Mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * @描述:文章管理 Mapper 接口 * @作者: Rong @@ -17,4 +19,6 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface SysContentMapper extends BaseMapper { IPage articlePaginationList(Page page, @Param("req") PageContentReqVO req); + + IPage getPublishedArticles(Page page, @Param("req") PageContentReqVO req); } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml index 38fa860..e1ce40e 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml @@ -38,20 +38,18 @@ ( SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id ) AS templateName, ( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS listStyle, ( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id ) AS detailStyle, - ( SELECT sty.path FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS path + ( SELECT sty.path FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS path FROM sys_column s WHERE - deleted = 1 and site_id = #{vo.siteId} + deleted = 1 and site_id = #{vo.siteId} and column_name LIKE CONCAT('%',#{vo.columnName},'%') ORDER BY - s.father_id, - s.sort ASC, - s.create_time desc + s.sort ASC ORDER BY @@ -78,16 +76,13 @@ T2.father_id, T2.level, T2.sort - FROM ( - SELECT @r AS _id, + FROM (SELECT @r AS _id, ( SELECT @r := father_id FROM sys_column WHERE id = _id ) AS parent_id, @l := @l + 1 AS lvl - FROM - ( SELECT @r := #{id}, @l := 0 ) vars, - sys_column h - WHERE - @r != 0 - ) T1 + FROM + ( SELECT @r := #{id}, @l := 0 ) vars, sys_column h + WHERE + @r != 0) T1 JOIN sys_column T2 ON T1._id = T2.id WHERE deleted = 1 @@ -102,7 +97,36 @@ ( SELECT u.username FROM sys_user u WHERE u.id = s.editor_id ) AS editorUser, ( SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id ) AS templateName, ( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS listStyle, - ( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id ) AS detailStyle + ( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id ) AS detailStyle, + ( SELECT sty.path FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS path + FROM + sys_column s + WHERE deleted = 1 and site_id = #{vo.siteId} + and menu_visible = 0 + + and column_name LIKE CONCAT('%',#{vo.columnName},'%') + + + + ORDER BY + s.sort ASC + + + ORDER BY + s.create_time asc + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml index e842a15..2a43901 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml @@ -1,50 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/service/SysColumnService.java b/src/main/java/com/huoran/iasf/service/SysColumnService.java index e88e009..4e5fe85 100644 --- a/src/main/java/com/huoran/iasf/service/SysColumnService.java +++ b/src/main/java/com/huoran/iasf/service/SysColumnService.java @@ -29,4 +29,7 @@ public interface SysColumnService extends IService { //长页栏目列表 R longPageColumnList(LongPageColumnReqVO reqVO); + + R getsTheSubColumn(Integer parentId,String ids); + } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/service/SysTemplateStyleService.java b/src/main/java/com/huoran/iasf/service/SysTemplateStyleService.java index 7d52b87..f32b1ff 100644 --- a/src/main/java/com/huoran/iasf/service/SysTemplateStyleService.java +++ b/src/main/java/com/huoran/iasf/service/SysTemplateStyleService.java @@ -3,6 +3,8 @@ package com.huoran.iasf.service; import com.huoran.iasf.entity.SysTemplateStyle; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** *

* 服务类 diff --git a/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java index 581d9d5..556bb7a 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java @@ -133,6 +133,11 @@ public class SysColumnServiceImpl extends ServiceImpl getChildren(Integer id, List allDept) { //存放子节点 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 3fa562f..11d110d 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java @@ -58,11 +58,11 @@ public class SysContentServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + /* QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("site_id", reqVO.getSiteId()); - queryWrapper.eq("is_release", Constant.ARTICLE_PUBLISHED).orderByDesc("create_time"); - Page page = new Page(reqVO.getPageNum(), reqVO.getPageSize()); - IPage pageList = baseMapper.selectPage(page, queryWrapper); + queryWrapper.eq("is_release", Constant.ARTICLE_PUBLISHED).orderByDesc("create_time");*/ + Page page = new Page(reqVO.getPageNum(), reqVO.getPageSize()); + IPage pageList = baseMapper.getPublishedArticles(page,reqVO); return R.success(pageList); } diff --git a/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java b/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java index 757ea7f..c98347a 100644 --- a/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java +++ b/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java @@ -34,5 +34,11 @@ public class PageContentReqVO extends PageReqVO { @NotNull(message = "站点id不能为空!") private Integer siteId; + @ApiModelProperty(value = "标签id(逗号隔开)") + private String lableId; + + + @ApiModelProperty(value = "分类id") + private Integer classificationId; } \ No newline at end of file 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 d73fce8..87483de 100644 --- a/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java +++ b/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java @@ -95,4 +95,12 @@ public class PageContentRespVO { @ApiModelProperty(value = "是否禁用(0默认,0启用 1禁用)") private Integer isDisable; + + @ApiModelProperty(value = "是否禁用(0默认,0启用 1禁用)") + private String labelName; + + + @ApiModelProperty(value = "是否禁用(0默认,0启用 1禁用)") + private String classificationName; + } \ No newline at end of file diff --git a/src/test/java/com/company/project/CodeGenerator.java b/src/test/java/com/company/project/CodeGenerator.java index d792040..b738510 100644 --- a/src/test/java/com/company/project/CodeGenerator.java +++ b/src/test/java/com/company/project/CodeGenerator.java @@ -61,7 +61,7 @@ public class CodeGenerator { // 5、策略配置 StrategyConfig strategy = new StrategyConfig(); - strategy.setInclude("sys_template_style"); + strategy.setInclude("sys_template_style_configuration"); strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 // strategy.setTablePrefix("sys_"); //生成实体时去掉表前缀 From dbc5e46f7ee7eb71f12be668672899a1c19f04e1 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 25 Nov 2022 10:20:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BE=9D=E6=8D=AE=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E6=9B=B4=E6=94=B9+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/SysTemplateStyleConfiguration.java | 37 +++++++++++++++++++ .../SysTemplateStyleConfigurationMapper.java | 20 ++++++++++ .../SysTemplateStyleConfigurationMapper.xml | 13 +++++++ .../SysTemplateStyleConfigurationService.java | 19 ++++++++++ ...TemplateStyleConfigurationServiceImpl.java | 29 +++++++++++++++ 5 files changed, 118 insertions(+) create mode 100644 src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java create mode 100644 src/main/java/com/huoran/iasf/mapper/SysTemplateStyleConfigurationMapper.java create mode 100644 src/main/java/com/huoran/iasf/mapper/xml/SysTemplateStyleConfigurationMapper.xml create mode 100644 src/main/java/com/huoran/iasf/service/SysTemplateStyleConfigurationService.java create mode 100644 src/main/java/com/huoran/iasf/service/impl/SysTemplateStyleConfigurationServiceImpl.java diff --git a/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java b/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java new file mode 100644 index 0000000..b3ddd9c --- /dev/null +++ b/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java @@ -0,0 +1,37 @@ +package com.huoran.iasf.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 栏目样式、列表样式、详情样式配置表 + *

+ * + * @author cheney + * @since 2022-11-24 + */ +@Data + @EqualsAndHashCode(callSuper = false) + @ApiModel(value="SysTemplateStyleConfiguration对象", description="栏目样式、列表样式、详情样式配置表") +public class SysTemplateStyleConfiguration implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "栏目id") + private Integer templateId; + + @ApiModelProperty(value = "样式id") + private Integer styleId; + + +} diff --git a/src/main/java/com/huoran/iasf/mapper/SysTemplateStyleConfigurationMapper.java b/src/main/java/com/huoran/iasf/mapper/SysTemplateStyleConfigurationMapper.java new file mode 100644 index 0000000..aa50c3b --- /dev/null +++ b/src/main/java/com/huoran/iasf/mapper/SysTemplateStyleConfigurationMapper.java @@ -0,0 +1,20 @@ +package com.huoran.iasf.mapper; + +import com.huoran.iasf.entity.SysTemplateStyle; +import com.huoran.iasf.entity.SysTemplateStyleConfiguration; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + *

+ * 栏目样式、列表样式、详情样式配置表 Mapper 接口 + *

+ * + * @author cheney + * @since 2022-11-24 + */ +public interface SysTemplateStyleConfigurationMapper extends BaseMapper { + List getTheStyleUnderTheTemplate(@Param("templateId") Integer templateId,@Param("type") Integer type); +} diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysTemplateStyleConfigurationMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysTemplateStyleConfigurationMapper.xml new file mode 100644 index 0000000..d1e46f7 --- /dev/null +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysTemplateStyleConfigurationMapper.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/src/main/java/com/huoran/iasf/service/SysTemplateStyleConfigurationService.java b/src/main/java/com/huoran/iasf/service/SysTemplateStyleConfigurationService.java new file mode 100644 index 0000000..eb3d991 --- /dev/null +++ b/src/main/java/com/huoran/iasf/service/SysTemplateStyleConfigurationService.java @@ -0,0 +1,19 @@ +package com.huoran.iasf.service; + +import com.huoran.iasf.entity.SysTemplateStyle; +import com.huoran.iasf.entity.SysTemplateStyleConfiguration; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 栏目样式、列表样式、详情样式配置表 服务类 + *

+ * + * @author cheney + * @since 2022-11-24 + */ +public interface SysTemplateStyleConfigurationService extends IService { + List getsTheStyleUnderTheTemplate(Integer templateId,Integer type); +} diff --git a/src/main/java/com/huoran/iasf/service/impl/SysTemplateStyleConfigurationServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysTemplateStyleConfigurationServiceImpl.java new file mode 100644 index 0000000..d5e2de2 --- /dev/null +++ b/src/main/java/com/huoran/iasf/service/impl/SysTemplateStyleConfigurationServiceImpl.java @@ -0,0 +1,29 @@ +package com.huoran.iasf.service.impl; + +import com.huoran.iasf.entity.SysTemplateStyle; +import com.huoran.iasf.entity.SysTemplateStyleConfiguration; +import com.huoran.iasf.mapper.SysTemplateStyleConfigurationMapper; +import com.huoran.iasf.service.SysTemplateStyleConfigurationService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 栏目样式、列表样式、详情样式配置表 服务实现类 + *

+ * + * @author cheney + * @since 2022-11-24 + */ +@Service +public class SysTemplateStyleConfigurationServiceImpl extends ServiceImpl implements SysTemplateStyleConfigurationService { + + + + @Override + public List getsTheStyleUnderTheTemplate(Integer templateId, Integer type) { + return baseMapper.getTheStyleUnderTheTemplate(templateId, type); + } +} From 062509c54e8ee4f95136fe1e00824d99add5e7e8 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 25 Nov 2022 18:29:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=89=8D=E5=8F=B0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iasf/controller/SysColumnController.java | 68 +++++++++++----- .../SysContentClassificationController.java | 6 +- .../iasf/controller/SysContentController.java | 35 ++++---- .../com/huoran/iasf/entity/SysContent.java | 5 ++ .../iasf/entity/SysContentClassification.java | 4 + .../entity/SysTemplateStyleConfiguration.java | 20 ++--- .../iasf/mapper/SysContentFileMapper.java | 5 +- .../huoran/iasf/mapper/SysContentMapper.java | 5 ++ .../iasf/mapper/xml/SysContentFileMapper.xml | 9 +++ .../iasf/mapper/xml/SysContentMapper.xml | 38 ++++++++- .../huoran/iasf/service/SysColumnService.java | 4 + .../iasf/service/SysContentFileService.java | 3 + .../iasf/service/SysContentService.java | 2 + .../impl/SysContentFileServiceImpl.java | 5 ++ .../service/impl/SysContentServiceImpl.java | 16 +++- .../huoran/iasf/vo/req/PageContentReqVO.java | 8 ++ .../iasf/vo/resp/PageContentRespVO.java | 81 +++++++++++++++++++ 17 files changed, 261 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/huoran/iasf/controller/SysColumnController.java b/src/main/java/com/huoran/iasf/controller/SysColumnController.java index c4c60ea..31915ba 100644 --- a/src/main/java/com/huoran/iasf/controller/SysColumnController.java +++ b/src/main/java/com/huoran/iasf/controller/SysColumnController.java @@ -6,7 +6,8 @@ import com.huoran.iasf.common.utils.Constant; import com.huoran.iasf.entity.ColumnEntity; import com.huoran.iasf.entity.SysColumn; import com.huoran.iasf.entity.SysContent; -import com.huoran.iasf.service.SysContentService; +import com.huoran.iasf.entity.SysTemplateStyle; +import com.huoran.iasf.service.*; import com.huoran.iasf.vo.req.ColumnWeightReqVO; import com.huoran.iasf.vo.req.PaginationColumnReqVO; import com.huoran.iasf.vo.resp.SortColumnRespVO; @@ -22,12 +23,13 @@ import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.Api; import org.springframework.web.bind.annotation.RequestParam; import io.swagger.annotations.ApiOperation; -import com.huoran.iasf.service.SysColumnService; import javax.validation.Valid; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** @@ -46,6 +48,13 @@ public class SysColumnController { @Autowired public SysContentService contentService; + @Autowired + public SysTemplateService templateService; + + @Autowired + public SysTemplateStyleService styleService; + @Autowired + public SysTemplateStyleConfigurationService templateStyleConfigurationService; @PostMapping("/listWithTree") @ApiOperation(value = "栏目树结构", response = SysColumn.class) @@ -64,6 +73,12 @@ public class SysColumnController { @ApiOperation(value = "查询详情", response = SysColumn.class) public R findById(@RequestParam("id") @ApiParam(value = "序号") Integer id) { SysColumn sysColumn = service.getById(id); + SysTemplateStyle sysTemplateStyle = styleService.getById(sysColumn.getListStyleId()); + + if (sysTemplateStyle.getPath() != null) { + sysColumn.setPath(sysTemplateStyle.getPath()); + } + return R.success(sysColumn); } @@ -74,7 +89,7 @@ public class SysColumnController { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.eq("father_id", sysColumn.getFatherId()); Integer count = service.count(queryWrapper); - sysColumn.setSort(count+1); + sysColumn.setSort(count + 1); boolean addState = service.save(sysColumn); return addState ? R.success(sysColumn.getId()) : R.fail("新增失败"); } @@ -124,18 +139,6 @@ public class SysColumnController { SysColumn sysColumn = new SysColumn(); BeanUtils.copyProperties(sort, sysColumn); service.updateById(sysColumn); - //依据当前循环获取的栏目id,查询到引用当前栏目的文章对其进行修改栏目id - /*QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("column_id", sysColumn.getId()); - List contentList = contentService.list(queryWrapper); - if (contentList.size() > 0) { - for (SysContent content : contentList) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.set("column_id", sysColumn.getId()); - contentService.update(content, updateWrapper); - } - }*/ - } return R.success(); @@ -145,6 +148,14 @@ public class SysColumnController { @PostMapping("/getsTheSubColumn") public R getsTheSubColumn(Integer id) { + String ids = this.getIds(id); + + return service.getsTheSubColumn(id, ids); + + } + + + public String getIds(Integer id) { //1 创建list集合,用于封装所有删除菜单id值 List idList = new ArrayList<>(); //2 向idList集合设置删除菜单id @@ -156,9 +167,7 @@ public class SysColumnController { str += idstr + ","; } String ids = str.substring(0, str.length() - 1); - - return service.getsTheSubColumn(id, ids); - + return ids; } public void selectCategoryChildById(String id, List idList) { @@ -178,5 +187,28 @@ public class SysColumnController { } + @ApiOperation("获取一级下的子级栏目以及下的全部文章标签") + @PostMapping("/getTheFullArticleByColumn") + public R getTheFullArticleByColumn(@ApiParam(name = "id", value = "一级栏目id", required = true) @RequestParam Integer id) { + String ids = this.getIds(id); + return contentService.getTheFullArticleByColumn(ids); + } + + + @ApiOperation("获取子级栏目id") + @PostMapping("/getsTheChildColumnId") + public R getsTheSublevelColumnIdOfTheNextLevel(@ApiParam(name = "id", value = "一级栏目id", required = true) @RequestParam Integer id) { + //1 创建list集合,用于封装所有删除菜单id值 + List idList = new ArrayList<>(); + //2 向idList集合设置删除菜单id + this.selectCategoryChildById(id + "", idList);//找到当前菜单的子菜单 把结果id封装到idlist里面去 + //把当前id封装到list里面 + idList.add(id);//现在把当前id封装进去 之前都是子菜单的id + return R.success(idList); + + } + + + } diff --git a/src/main/java/com/huoran/iasf/controller/SysContentClassificationController.java b/src/main/java/com/huoran/iasf/controller/SysContentClassificationController.java index f8ed41c..c7c5190 100644 --- a/src/main/java/com/huoran/iasf/controller/SysContentClassificationController.java +++ b/src/main/java/com/huoran/iasf/controller/SysContentClassificationController.java @@ -38,8 +38,10 @@ public class SysContentClassificationController { @PostMapping("/allTheQuery") @ApiOperation(value = "查询全部文章所属分类", response = SysContentClassification.class) - public R allTheQuery(@ApiParam(name = "siteId", value = "站点id", required = true) @RequestParam Integer siteId) { - List list = service.list(new QueryWrapper().eq("site_id", siteId)); + public R allTheQuery(@ApiParam(name = "siteId", value = "站点id", required = true) @RequestParam Integer siteId, + @ApiParam(name = "templateId", value = "模板id", required = true) @RequestParam Integer templateId) { + List list = service.list(new QueryWrapper() + .eq("site_id", siteId).eq("template_id",templateId)); return R.success(list); } diff --git a/src/main/java/com/huoran/iasf/controller/SysContentController.java b/src/main/java/com/huoran/iasf/controller/SysContentController.java index a072c3a..d44a2f1 100644 --- a/src/main/java/com/huoran/iasf/controller/SysContentController.java +++ b/src/main/java/com/huoran/iasf/controller/SysContentController.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.huoran.iasf.entity.SysColumn; import com.huoran.iasf.entity.SysContentFile; import com.huoran.iasf.service.SysColumnService; +import com.huoran.iasf.service.SysContentFileService; import com.huoran.iasf.vo.req.ContentHeavyTitleReqVO; import com.huoran.iasf.vo.req.ContentReq; import com.huoran.iasf.vo.req.PageContentReqVO; @@ -44,6 +45,10 @@ public class SysContentController { @Autowired public SysColumnService columnService; + @Autowired + public SysContentFileService fileService; + + @PostMapping("/pagingQuery") @ApiOperation(value = "分页查询", response = PageContentRespVO.class) public R pagingQuery(@RequestBody @Valid @ApiParam(name = "分页查询参数", value = "传入json格式", required = true) PageContentReqVO sysContent) { @@ -51,19 +56,17 @@ public class SysContentController { } - - - @PostMapping("/findById") @ApiOperation(value = "查询详情", response = SysContent.class) public R findById(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) { SysContent sysContent = service.getById(id); SysColumn sysColumn = columnService.getById(sysContent.getColumnId()); - if (sysColumn.getColumnName()!=null){ + if (sysColumn.getColumnName() != null) { sysContent.setColumnName(sysColumn.getColumnName()); } - + List fileList = fileService.getFileByContentId(id); + sysContent.setFileList(fileList); return R.success(sysContent); } @@ -92,7 +95,6 @@ public class SysContentController { } - @PostMapping("/batchDeletion") @ApiOperation(value = "批量删除文章", response = SysContent.class) public R batchDeletion(@ApiParam(name = "ids", value = "主键", required = true) @RequestParam List ids) { @@ -123,30 +125,29 @@ public class SysContentController { /** * 获取栏目下的文章 + * * @param pageReq * @return */ @PostMapping("/getColumnArticles") - @ApiOperation(value = "获取栏目下的文章",response = SysContent.class) + @ApiOperation(value = "获取栏目下的文章", response = SysContent.class) public R getColumnArticles(@RequestBody @ApiParam(name = "文章管理对象", value = "传入json格式", required = true) ContentReq pageReq) { IPage page = new Page(pageReq.getPageNum(), pageReq.getPageSize()); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("column_id",pageReq.getColumnIds()); - IPage iPage = service.page(page,queryWrapper); + queryWrapper.in("column_id", pageReq.getColumnIds()); + IPage iPage = service.page(page, queryWrapper); return R.success(iPage); } - @PostMapping("/articleEnableOrDisable") - @ApiOperation(value = "文章启用禁用",response = SysContent.class) - public R articleEnableOrDisable(@ApiParam(name = "id", value = "文章id", required = true) @RequestParam Integer id, - @ApiParam(name = "isDisable", value = "是否禁用(0默认,0启用 1禁用)", required = true) @RequestParam Integer isDisable) { + @ApiOperation(value = "文章启用禁用", response = SysContent.class) + public R articleEnableOrDisable(@ApiParam(name = "id", value = "文章id", required = true) @RequestParam Integer id, @ApiParam(name = "isDisable", value = "是否禁用(0默认,0启用 1禁用)", required = true) @RequestParam Integer isDisable) { UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.set("is_disable",isDisable); - updateWrapper.eq("id",id); - boolean ret = service.update(updateWrapper); - return ret?R.success():R.fail("禁用/启用失败"); + updateWrapper.set("is_disable", isDisable); + updateWrapper.eq("id", id); + boolean ret = service.update(updateWrapper); + return ret ? R.success() : R.fail("禁用/启用失败"); } } diff --git a/src/main/java/com/huoran/iasf/entity/SysContent.java b/src/main/java/com/huoran/iasf/entity/SysContent.java index b1abf6a..aaedd74 100644 --- a/src/main/java/com/huoran/iasf/entity/SysContent.java +++ b/src/main/java/com/huoran/iasf/entity/SysContent.java @@ -7,6 +7,7 @@ import lombok.Data; import java.io.Serializable; import java.time.LocalDateTime; import java.util.Date; +import java.util.List; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -154,4 +155,8 @@ public class SysContent implements Serializable { @ApiModelProperty(value = "栏目名称") @TableField(exist = false) private String columnName; + + @ApiModelProperty(value = "文章附件") + @TableField(exist = false) + List fileList; } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/entity/SysContentClassification.java b/src/main/java/com/huoran/iasf/entity/SysContentClassification.java index 551dd91..9913341 100644 --- a/src/main/java/com/huoran/iasf/entity/SysContentClassification.java +++ b/src/main/java/com/huoran/iasf/entity/SysContentClassification.java @@ -53,5 +53,9 @@ public class SysContentClassification implements Serializable { @NotNull(message = "站点id不能为空!") private Integer siteId; + @ApiModelProperty(value = "模板id(用于区分哪个模板下的分类)") + @NotNull(message = "模板id不能为空!") + private Integer templateId; + } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java b/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java index b3ddd9c..3781d96 100644 --- a/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java +++ b/src/main/java/com/huoran/iasf/entity/SysTemplateStyleConfiguration.java @@ -2,7 +2,9 @@ package com.huoran.iasf.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; + import java.io.Serializable; + import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -17,21 +19,21 @@ import lombok.EqualsAndHashCode; * @since 2022-11-24 */ @Data - @EqualsAndHashCode(callSuper = false) - @ApiModel(value="SysTemplateStyleConfiguration对象", description="栏目样式、列表样式、详情样式配置表") +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "SysTemplateStyleConfiguration对象", description = "栏目样式、列表样式、详情样式配置表") public class SysTemplateStyleConfiguration implements Serializable { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "主键") - @TableId(value = "id", type = IdType.AUTO) - private Integer id; + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; - @ApiModelProperty(value = "栏目id") - private Integer templateId; + @ApiModelProperty(value = "模板id") + private Integer templateId; - @ApiModelProperty(value = "样式id") - private Integer styleId; + @ApiModelProperty(value = "样式id") + private Integer styleId; } diff --git a/src/main/java/com/huoran/iasf/mapper/SysContentFileMapper.java b/src/main/java/com/huoran/iasf/mapper/SysContentFileMapper.java index b8b63b4..4d3120a 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysContentFileMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysContentFileMapper.java @@ -3,6 +3,9 @@ package com.huoran.iasf.mapper; import com.huoran.iasf.entity.SysContentFile; import org.apache.ibatis.annotations.Mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @描述:文章附件管理表 Mapper 接口 @@ -11,5 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ @Mapper public interface SysContentFileMapper extends BaseMapper { - + List getFileByContentId(@Param("contentId") Integer contentId); } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java b/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java index d61fc62..bdb0e15 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java @@ -2,7 +2,10 @@ package com.huoran.iasf.mapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huoran.iasf.common.utils.R; import com.huoran.iasf.entity.SysContent; +import com.huoran.iasf.entity.SysContentClassification; +import com.huoran.iasf.entity.SysContentLabel; import com.huoran.iasf.vo.req.PageContentReqVO; import com.huoran.iasf.vo.resp.PageContentRespVO; import org.apache.ibatis.annotations.Mapper; @@ -21,4 +24,6 @@ public interface SysContentMapper extends BaseMapper { IPage articlePaginationList(Page page, @Param("req") PageContentReqVO req); IPage getPublishedArticles(Page page, @Param("req") PageContentReqVO req); + + List useTheColumnToGetTagsForTheFullArticle(String ids); } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysContentFileMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysContentFileMapper.xml index c5aa3e3..32101c1 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysContentFileMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysContentFileMapper.xml @@ -16,5 +16,14 @@ + \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml index 2a43901..2a9c491 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml @@ -39,9 +39,11 @@ ORDER BY c.create_time desc + + + + \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/service/SysColumnService.java b/src/main/java/com/huoran/iasf/service/SysColumnService.java index 4e5fe85..6912fb6 100644 --- a/src/main/java/com/huoran/iasf/service/SysColumnService.java +++ b/src/main/java/com/huoran/iasf/service/SysColumnService.java @@ -32,4 +32,8 @@ public interface SysColumnService extends IService { R getsTheSubColumn(Integer parentId,String ids); + + + + } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/service/SysContentFileService.java b/src/main/java/com/huoran/iasf/service/SysContentFileService.java index 27d6295..10effc4 100644 --- a/src/main/java/com/huoran/iasf/service/SysContentFileService.java +++ b/src/main/java/com/huoran/iasf/service/SysContentFileService.java @@ -3,6 +3,8 @@ package com.huoran.iasf.service; import com.huoran.iasf.entity.SysContentFile; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * @描述:文章附件管理表 service接口 * @作者: Rong @@ -10,5 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface SysContentFileService extends IService { + List getFileByContentId(Integer contentId); } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/service/SysContentService.java b/src/main/java/com/huoran/iasf/service/SysContentService.java index 705ed61..5513b0e 100644 --- a/src/main/java/com/huoran/iasf/service/SysContentService.java +++ b/src/main/java/com/huoran/iasf/service/SysContentService.java @@ -22,4 +22,6 @@ public interface SysContentService extends IService { //查询已发布的、启用了的文章列表 R publishedEnabledArticles(); + + R getTheFullArticleByColumn(String ids); } \ No newline at end of file diff --git a/src/main/java/com/huoran/iasf/service/impl/SysContentFileServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysContentFileServiceImpl.java index 43efa74..11bcbf4 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysContentFileServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysContentFileServiceImpl.java @@ -8,6 +8,7 @@ import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.Resource; +import java.util.List; /** * @描述:文章附件管理表 服务类 @@ -20,6 +21,10 @@ public class SysContentFileServiceImpl extends ServiceImpl getFileByContentId(Integer contentId) { + return baseMapper.getFileByContentId(contentId); + } } 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 11d110d..48c0e52 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java @@ -15,7 +15,7 @@ import com.huoran.iasf.vo.resp.PageContentRespVO; import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; -import java.util.List; +import java.util.*; /** * @描述:文章管理 服务类 @@ -62,7 +62,7 @@ public class SysContentServiceImpl extends ServiceImpl page = new Page(reqVO.getPageNum(), reqVO.getPageSize()); - IPage pageList = baseMapper.getPublishedArticles(page,reqVO); + IPage pageList = baseMapper.getPublishedArticles(page, reqVO); return R.success(pageList); } @@ -71,13 +71,23 @@ public class SysContentServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("is_release", Constant.ARTICLE_PUBLISHED); - queryWrapper.eq("template_status",Constant.TEMPLATE_STATUS_ENABLED); + queryWrapper.eq("template_status", Constant.TEMPLATE_STATUS_ENABLED); List sysContentList = mapper.selectList(queryWrapper); return R.success(sysContentList); } + + @Override + public R getTheFullArticleByColumn(String ids) { + return R.success(mapper.useTheColumnToGetTagsForTheFullArticle(ids)); + } + + + + } + diff --git a/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java b/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java index c98347a..e99930b 100644 --- a/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java +++ b/src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java @@ -41,4 +41,12 @@ public class PageContentReqVO extends PageReqVO { @ApiModelProperty(value = "分类id") private Integer classificationId; + + @ApiModelProperty(value = "标签名称") + private List labelName; + + + @ApiModelProperty(value = "召开类型(1.即将召开 2.已经召开)") + private Integer convokeType; + } \ No newline at end of file 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 87483de..1d97458 100644 --- a/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java +++ b/src/main/java/com/huoran/iasf/vo/resp/PageContentRespVO.java @@ -103,4 +103,85 @@ public class PageContentRespVO { @ApiModelProperty(value = "是否禁用(0默认,0启用 1禁用)") private String classificationName; + + @ApiModelProperty(value = "创建人id") + private Integer founderId; + + @ApiModelProperty(value = "编辑人id") + private Integer editorId; + + + @ApiModelProperty(value = "是否在新窗口打开(0:否 1:是)") + private Integer isOpen; + + @ApiModelProperty(value = "是否删除(1未删除;0已删除)") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "站点id") + private Integer siteId; + + @ApiModelProperty(value = "模板状态(0禁用;1启用)") + private Integer templateStatus; + + + @ApiModelProperty(value = "链接类型") + private Integer connectionType; + + @ApiModelProperty(value = "链接地址") + private String linkAddress; + + @ApiModelProperty(value = "站点选择(连接类型为其它站点连接时储存)") + private Integer siteSelection; + + @ApiModelProperty(value = "编辑人") + private String edit; + + @ApiModelProperty(value = "审核人") + private String audit; + + @ApiModelProperty(value = "活动开始时间") + private Date activityStartTime; + + @ApiModelProperty(value = "活动结束时间") + private Date activityEndTime; + + @ApiModelProperty(value = "演讲系列") + private String lectureSeries; + + @ApiModelProperty(value = "线上地点") + private String onlineLocation; + + @ApiModelProperty(value = "线下地点") + private String offlineLocation; + + @ApiModelProperty(value = "主讲人") + private String keynoteSpeaker; + + @ApiModelProperty(value = "活动简介") + private String eventProfile; + + @ApiModelProperty(value = "出版年份") + private String publicationYear; + + @ApiModelProperty(value = "出版类型(前端自定义)") + private Integer publicationTypeId; + + @ApiModelProperty(value = "DOI") + private String doi; + + @ApiModelProperty(value = "引用") + private String quote; + + @ApiModelProperty(value = "主题标签(sys_content_label表外键) 可多选逗号隔开") + private String lableId; + + @ApiModelProperty(value = "所属分类(sys_content_classification表外键)") + private Integer classificationId; + + + @ApiModelProperty(value = "样式id(用于前端区分是会议还是文章跳转界面)") + private Integer listStyleId; + + } \ No newline at end of file