package com.cm.common.controller.route.bigdatatemplate;

import com.cm.common.base.AbstractController;
import com.cm.common.component.SecurityComponent;
import com.cm.common.constants.ISystemConstant;
import com.cm.common.service.bigdatatemplate.IBigdataTemplateService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
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.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @ClassName: BigdataTemplateRouteController
 * @Description: 大数据展示模板页面
 * @Author: WenG
 * @Date: 2020-05-07 16:50
 * @Version: 1.0
 **/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "大数据展示模板页面接口")
@RestController
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/bigdatatemplate")
public class BigdataTemplateRouteController extends AbstractController {

    @Autowired
    private IBigdataTemplateService bigdataTemplateService;
    @Autowired
    private SecurityComponent securityComponent;

    @GetMapping("listbigdatatemplateselect")
    public ModelAndView listBigdataTemplateSelect(@RequestParam("bigdataTemplateId") String bigdataTemplateId) {
        ModelAndView mv = new ModelAndView("bigdatatemplate/list-bigdatatemplateselect");
        mv.addObject("bigdataTemplateId", bigdataTemplateId);
        return mv;
    }

    @GetMapping("listbigdatatemplate")
    public ModelAndView listBigdataTemplate() {
        ModelAndView mv = new ModelAndView("bigdatatemplate/list-bigdatatemplate");
        return mv;
    }

    @GetMapping("savebigdatatemplate")
    public ModelAndView saveBigdataTemplate() {
        ModelAndView mv = new ModelAndView("bigdatatemplate/save-bigdatatemplate");
        return mv;
    }

    @GetMapping("updatebigdatatemplate")
    public ModelAndView updateBigdataTemplate(@RequestParam("bigdataTemplateId") String bigdataTemplateId) {
        ModelAndView mv = new ModelAndView("bigdatatemplate/update-bigdatatemplate");
        mv.addObject("bigdataTemplateId", bigdataTemplateId);
        return mv;
    }

    @GetMapping("savebigdatatemplatearea")
    public ModelAndView saveBigdataTemplateArea(@RequestParam("bigdataTemplateId") String bigdataTemplateId) {
        ModelAndView mv = new ModelAndView("bigdatatemplate/save-bigdatatemplatearea");
        mv.addObject("bigdataTemplateId", bigdataTemplateId);
        return mv;
    }

    @GetMapping("updatebigdatatemplatecontent")
    public ModelAndView updateBigdataTemplateContent(@RequestParam("bigdataTemplateId") String bigdataTemplateId) {
        ModelAndView mv = new ModelAndView("bigdatatemplate/update_bigdatatemplate_content");
        mv.addObject("bigdataTemplateId", bigdataTemplateId);
        return mv;
    }

}