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"); } }