package com.cm.common.article.controller.route.articlecategory;

import com.cm.common.constants.ISystemConstant;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ArticleCategoryRouteController
 * @Description: 文章类别页面
 * @Author: WangGeng
 * @Date: 2020/4/3 16:10
 * @Version: 1.0
 **/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "文章类别页面接口")
@Controller
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/articlecategory")
public class ArticleCategoryRouteController {

    @GetMapping("listarticlecategory")
    public ModelAndView listArticleCategory() {
        ModelAndView mv = new ModelAndView("articlecategory/list-articlecategory");
        return mv;
    }

    @GetMapping("savearticlecategory")
    public ModelAndView saveArticleCategory() {
        ModelAndView mv = new ModelAndView("articlecategory/save-articlecategory");
        return mv;
    }

    @GetMapping("updatearticlecategory")
    public ModelAndView updateArticleCategory(@RequestParam("articleCategoryId") String articleCategoryId) {
        ModelAndView mv = new ModelAndView("articlecategory/update-articlecategory");
        mv.addObject("articleCategoryId", articleCategoryId);
        return mv;
    }

}
