package cn.com.tenlion.buildingpictures.controller.route.picturestemplate;

import cn.com.tenlion.buildingpictures.service.picturestemplate.IPicturesTemplateService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.interfaces.consts.ISystemConstant;
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: PicturesTemplateRouteController
 * @Description: 图片套版模板页面
 * @Author: WenG
 * @Date: 2020-05-07 16:50
 * @Version: 1.0
 **/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "图片套版模板页面接口")
@RestController
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/picturestemplate")
public class PicturesTemplateRouteController extends DefaultBaseController {

    @Autowired
    private IPicturesTemplateService picturesTemplateService;
    @Autowired
    private SecurityComponent securityComponent;

    @GetMapping("listpicturestemplateselect")
    public ModelAndView listPicturesTemplateSelect(@RequestParam("picturesTemplateId") String picturesTemplateId) {
        ModelAndView mv = new ModelAndView("picturestemplate/list-picturestemplateselect");
        mv.addObject("picturesTemplateId", picturesTemplateId);
        return mv;
    }

    @GetMapping("listpicturestemplate")
    public ModelAndView listPicturesTemplate() {
        ModelAndView mv = new ModelAndView("picturestemplate/list-picturestemplate");
        return mv;
    }

    @GetMapping("savepicturestemplate")
    public ModelAndView savePicturesTemplate() {
        ModelAndView mv = new ModelAndView("picturestemplate/save-picturestemplate");
        return mv;
    }

    @GetMapping("updatepicturestemplate")
    public ModelAndView updatePicturesTemplate(@RequestParam("picturesTemplateId") String picturesTemplateId) {
        ModelAndView mv = new ModelAndView("picturestemplate/update-picturestemplate");
        mv.addObject("picturesTemplateId", picturesTemplateId);
        return mv;
    }

    @GetMapping("savepicturestemplatearea")
    public ModelAndView savePicturesTemplateArea(@RequestParam("picturesTemplateId") String picturesTemplateId) {
        ModelAndView mv = new ModelAndView("picturestemplate/save-picturestemplatearea");
        mv.addObject("picturesTemplateId", picturesTemplateId);
        return mv;
    }

    @GetMapping("updatepicturestemplatecontent")
    public ModelAndView updatePicturesTemplateContent(@RequestParam("picturesTemplateId") String picturesTemplateId) {
        ModelAndView mv = new ModelAndView("picturestemplate/update_picturestemplate_content");
        mv.addObject("picturesTemplateId", picturesTemplateId);
        return mv;
    }

}