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 com.xcong.farmer.cms.modules.system.service.IReleaseService;
|
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 IReleaseService releaseService;
|
|
@ApiOperation(value = "发布文章", notes = "发布文章")
|
@PostMapping(value = "releaseArticle/{id}")
|
public Result releaseArticle(@PathVariable("id") Long 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) {
|
releaseService.releaseColumn(id, type);
|
return Result.ok("success");
|
}
|
|
@ApiOperation(value = "发布首页", notes = "发布首页")
|
@PostMapping(value = "/releaseIndex")
|
public Result releaseIndex() {
|
releaseService.releaseIndex();
|
return Result.ok("success");
|
}
|
}
|