From e703d415ff36584518a76d4d26363bfd1556b43b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 05 Jul 2022 12:01:35 +0800
Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/farmer-cms
---
src/main/java/com/xcong/farmer/cms/modules/core/controller/CmsCoreController.java | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/xcong/farmer/cms/modules/core/controller/CmsCoreController.java b/src/main/java/com/xcong/farmer/cms/modules/core/controller/CmsCoreController.java
index 23bc571..938022c 100644
--- a/src/main/java/com/xcong/farmer/cms/modules/core/controller/CmsCoreController.java
+++ b/src/main/java/com/xcong/farmer/cms/modules/core/controller/CmsCoreController.java
@@ -3,6 +3,7 @@
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.core.service.ICmsCoreService;
import com.xcong.farmer.cms.modules.system.service.IArticleService;
+import com.xcong.farmer.cms.modules.system.service.IReleaseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -21,12 +22,23 @@
public class CmsCoreController {
@Autowired
- private IArticleService articleService;
+ private IReleaseService releaseService;
@ApiOperation(value = "发布文章", notes = "发布文章")
@PostMapping(value = "releaseArticle/{id}")
public Result releaseArticle(@PathVariable("id") Long id) {
- articleService.releaseArticle(id);
+ releaseService.releaseArticle(id);
+ return Result.ok("success");
+ }
+
+ @ApiOperation(value = "发布栏目", notes = "发布栏目")
+ @PostMapping(value = "releaseColumn/{type}/{id}")
+ public Result releaseColumn(@PathVariable("id") Long id, @PathVariable("type") Integer type) {
+ boolean article = false;
+ if (type == 1) {
+ article = true;
+ }
+ releaseService.releaseColumn(id, article);
return Result.ok("success");
}
}
--
Gitblit v1.9.1