| | |
| | | **/ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(value = "/cms") |
| | | @RequestMapping(value = "/api") |
| | | @Api(value = "CmsCoreController", tags = "CMS核心类") |
| | | public class CmsCoreController { |
| | | |
| | |
| | | @PostMapping(value = "releaseArticle/{id}") |
| | | public Result releaseArticle(@PathVariable("id") Long id) { |
| | | Long companyId = LoginUserUtil.getCompanyId(); |
| | | // Long companyId = 24L; |
| | | releaseService.releaseArticle(id, companyId); |
| | | return Result.ok("success"); |
| | | } |
| | |
| | | @PostMapping(value = "releaseColumn/{type}/{id}") |
| | | public Result releaseColumn(@PathVariable("id") Long id, @PathVariable("type") Integer type) { |
| | | Long companyId = LoginUserUtil.getCompanyId(); |
| | | // Long companyId = 24L; |
| | | releaseService.releaseColumn(id, type, companyId); |
| | | return Result.ok("success"); |
| | | } |
| | |
| | | @PostMapping(value = "/releaseIndex") |
| | | public Result releaseIndex() { |
| | | Long companyId = LoginUserUtil.getCompanyId(); |
| | | releaseService.releaseIndex(companyId); |
| | | // 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("发布成功"); |
| | | } |
| | | |
| | | } |