package ink.wgink.module.map.controller.route.grid;

import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.properties.map.SuperMapProperties;
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;

/**
 * @ClassName: GridRouteController
 * @Description: 网格路由
 * @Author: wanggeng
 * @Date: 2021/10/20 9:33 上午
 * @Version: 1.0
 */
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "网格")
@Controller
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/grid/super-map")
public class GridSuperMapRouteController {

    @Autowired
    private SuperMapProperties superMapProperties;

    @GetMapping("save")
    public ModelAndView save() {
        ModelAndView mv = new ModelAndView("grid/grid/super-map/save");
        mv.addObject("superMapProperties", superMapProperties);
        return mv;
    }

    @GetMapping("update")
    public ModelAndView update() {
        ModelAndView mv = new ModelAndView("grid/grid/super-map/update");
        mv.addObject("superMapProperties", superMapProperties);
        return mv;
    }

    @GetMapping("get")
    public ModelAndView get() {
        ModelAndView mv = new ModelAndView("grid/grid/super-map/get");
        mv.addObject("superMapProperties", superMapProperties);
        return mv;
    }

    @GetMapping("list")
    public ModelAndView list() {
        return new ModelAndView("grid/grid/super-map/list");
    }

    @GetMapping("list-select")
    public ModelAndView listSelect() {
        return new ModelAndView("grid/grid/super-map/list-select");
    }

}
