package ink.wgink.module.form.controller.route.design;

import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.interfaces.menu.IMenuBaseService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Description: 表单设计
 * @Author: WenG
 * @Date: 2022/3/7 11:17
 * @Version: 1.0
 **/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "表单")
@Controller
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/form")
public class FormRouteController {

    @Autowired(required = false)
    private IMenuBaseService menuBaseService;

    @GetMapping("list")
    public ModelAndView list() {
        ModelAndView mv = new ModelAndView("form/list");
        mv.addObject("hasMenuService", menuBaseService != null ? true : false);
        return mv;
    }

    @GetMapping("list-history")
    public ModelAndView listHistory() {
        ModelAndView mv = new ModelAndView("form/list-history");
        mv.addObject("hasMenuService", menuBaseService != null ? true : false);
        return mv;
    }

    @GetMapping("list-select")
    public ModelAndView listSelect() {
        ModelAndView mv = new ModelAndView("form/list-select");
        return mv;
    }

    @GetMapping("get-save-page-code")
    public ModelAndView getSavePageCode() {
        ModelAndView mv = new ModelAndView("form/get-save-page-code");
        return mv;
    }

    @GetMapping("get-update-page-code")
    public ModelAndView getUpdatePageCode() {
        ModelAndView mv = new ModelAndView("form/get-update-page-code");
        return mv;
    }

    @GetMapping("get-show-page-code")
    public ModelAndView getShowPageCode() {
        ModelAndView mv = new ModelAndView("form/get-show-page-code");
        return mv;
    }

    @GetMapping("get-print-page-code")
    public ModelAndView getPrintPageCode() {
        ModelAndView mv = new ModelAndView("form/get-print-page-code");
        return mv;
    }

    @GetMapping("get-app-save-page-code")
    public ModelAndView getAppSavePageCode() {
        ModelAndView mv = new ModelAndView("form/get-app-save-page-code");
        return mv;
    }

    @GetMapping("get-app-update-page-code")
    public ModelAndView getAppUpdatePageCode() {
        ModelAndView mv = new ModelAndView("form/get-app-update-page-code");
        return mv;
    }

    @GetMapping("get-app-show-page-code")
    public ModelAndView getAppShowPageCode() {
        ModelAndView mv = new ModelAndView("form/get-app-show-page-code");
        return mv;
    }

    @GetMapping("get-form-source-data")
    public ModelAndView getFormSourceData() {
        ModelAndView mv = new ModelAndView("form/get-form-source-data");
        return mv;
    }

}
