package incheon.sgp.ipd.common.web;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import incheon.sgp.ipd.academy.vo.AcademyVO;
import incheon.sgp.ipd.common.service.CommonService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Controller
@RequiredArgsConstructor
@Slf4j
@RequestMapping("/sgp/ipd/")
public class CommonController {
	@Autowired
	private final CommonService commonService;
	
	@GetMapping("/main.do")
	public String AcademyList(
			HttpSession session,
			@RequestParam(defaultValue = "1") int page,
			@ModelAttribute AcademyVO vo,
			ModelMap model) {
		
		return "/sgp/ipd/ipdMapMain";

	}

    @GetMapping("/sub.do")
    public String refactor(
            HttpSession session,
            @RequestParam(defaultValue = "1") int page,
            @ModelAttribute AcademyVO vo,
            ModelMap model){

        return "/sgp/ipd/sub";
    }
}
