package com.skymobi.qc.admin.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
import com.skymobi.qc.admin.framework.base.BaseController;
@Controller
@RequestMapping({"/"})
public class MainController extends BaseController {
/**
* 首页面,根据登录情况进行跳转.
* if unlogin:
* /login
* else:
* /frame
* @return String
*/
@RequestMapping
public String main() {
return "/main/login";
}
@RequestMapping("/main")
public ModelAndView mainPage(Model model) {
return new ModelAndView(new RedirectView("/cpqa/project"));
}
// public String add(@Valid AppointmentForm appointment, BindingResult result) {
// if (result.hasErrors()) {
// return "appointments/new";
// }
// appointmentBook.addAppointment(appointment);
// return "redirect:/appointments";
// }
}