Helius
2022-07-03 f32a53f5534aa9f9a8591e8b197bb1f8acd9e6c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.xcong.farmer.cms.modules.core.controller;
 
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * @author wzy
 * @date 2022-07-03
 **/
@Slf4j
@RestController
@RequestMapping(value = "/cms")
@Api(value = "CmsCoreController", tags = "CMS核心类")
public class CmsCoreController {
 
    @Autowired
    private IArticleService articleService;
 
    @ApiOperation(value = "发布文章", notes = "发布文章")
    @PostMapping(value = "releaseArticle/{id}")
    public Result releaseArticle(@PathVariable("id") Long id) {
        articleService.releaseArticle(id);
        return Result.ok("success");
    }
}