diff --git a/src/main/java/com/huoran/iasf/controller/SysContentController.java b/src/main/java/com/huoran/iasf/controller/SysContentController.java index 5bb7b08..f5fee2d 100644 --- a/src/main/java/com/huoran/iasf/controller/SysContentController.java +++ b/src/main/java/com/huoran/iasf/controller/SysContentController.java @@ -164,11 +164,11 @@ public class SysContentController { /*查询已发布的、启用了的文章列表接口*/ - @PostMapping("/publishedEnabledArticles") +/* @PostMapping("/publishedEnabledArticles") @ApiOperation(value = "查询已发布的、启用了的文章列表", response = PageContentReqVO.class) public R publishedEnabledArticles() { return service.publishedEnabledArticles(); - } + }*/ /** @@ -242,5 +242,13 @@ public class SysContentController { } + @PostMapping("/queryArticleColumnParent") + @ApiOperation(value = "查询文章的栏目父级", response = PageContentReqVO.class) + public R queryArticleColumnParent(@ApiParam(name = "articleId", value = "文章id", required = true) @RequestParam Integer articleId) { + return service.queryArticleColumnParent(articleId); + } + + + } diff --git a/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java b/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java index 9e111c5..437a5e8 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysContentMapper.java @@ -3,6 +3,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.entity.SysContent; import com.huoran.iasf.entity.SysContentClassification; import com.huoran.iasf.entity.SysContentLabel; @@ -39,4 +40,7 @@ public interface SysContentMapper extends BaseMapper { Integer selectPreviousId(@Param("content")SysContent sysContent);*/ + List queryArticleColumnParent(@Param("columnId")Integer columnId); + + } \ 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 2c4fbce..a7d2030 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml @@ -255,6 +255,21 @@ release_time DESC, create_time DESC + \ 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 42fc556..a61b155 100644 --- a/src/main/java/com/huoran/iasf/service/SysContentService.java +++ b/src/main/java/com/huoran/iasf/service/SysContentService.java @@ -39,6 +39,8 @@ public interface SysContentService extends IService { R siteSearchArticles(PageContentReqVO req); + R queryArticleColumnParent(Integer articleId); + // R modifiedSort(List reqList); // R modifiedSort(Integer sequenceNumber, Integer articleId); 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 b1389df..f411438 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java @@ -147,6 +147,13 @@ public class SysContentServiceImpl extends ServiceImpl reqList) { for (ArticleModifiedSortReq req : reqList) {