From 5560f3c0c34d014106f3db6584b760d32ce5ed81 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 16 Aug 2022 16:21:20 +0800
Subject: [PATCH] fix
---
src/main/java/com/xcong/farmer/cms/modules/core/controller/CmsCoreController.java | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 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 7b46150..23f8b67 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
@@ -18,7 +18,7 @@
**/
@Slf4j
@RestController
-@RequestMapping(value = "/cms")
+@RequestMapping(value = "/api")
@Api(value = "CmsCoreController", tags = "CMS核心类")
public class CmsCoreController {
@@ -28,8 +28,8 @@
@ApiOperation(value = "发布文章", notes = "发布文章")
@PostMapping(value = "releaseArticle/{id}")
public Result releaseArticle(@PathVariable("id") Long id) {
-// Long companyId = LoginUserUtil.getCompanyId();
- Long companyId = 24L;
+ Long companyId = LoginUserUtil.getCompanyId();
+// Long companyId = 24L;
releaseService.releaseArticle(id, companyId);
return Result.ok("success");
}
@@ -37,8 +37,8 @@
@ApiOperation(value = "发布栏目", notes = "发布栏目")
@PostMapping(value = "releaseColumn/{type}/{id}")
public Result releaseColumn(@PathVariable("id") Long id, @PathVariable("type") Integer type) {
-// Long companyId = LoginUserUtil.getCompanyId();
- Long companyId = 24L;
+ Long companyId = LoginUserUtil.getCompanyId();
+// Long companyId = 24L;
releaseService.releaseColumn(id, type, companyId);
return Result.ok("success");
}
@@ -46,11 +46,19 @@
@ApiOperation(value = "发布首页", notes = "发布首页")
@PostMapping(value = "/releaseIndex")
public Result releaseIndex() {
-// Long companyId = LoginUserUtil.getCompanyId();
- Long companyId = 24L;
+ Long companyId = LoginUserUtil.getCompanyId();
+// Long companyId = 24L;
releaseService.releaseIndex(companyId, true);
return Result.ok("success");
}
+ @ApiOperation(value = "发布全站", notes = "发布全站")
+ @PostMapping(value = "/releaseAll")
+ public Result releaseAll() {
+ Long companyId = LoginUserUtil.getCompanyId();
+// Long companyId = 24L;
+ releaseService.releaseAll(companyId);
+ return Result.ok("发布成功");
+ }
}
--
Gitblit v1.9.1