package com.goafanti.common.controller;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.goafanti.user.service.OrganizationIdentityService;
import com.goafanti.user.service.UserIdentityService;
import com.goafanti.news.service.NewsService;

@Controller
public class WebpageController extends BaseController {




	@Resource
	private UserIdentityService userIdentityService;

	@Resource
	private OrganizationIdentityService organizationIdentityService;

	@Resource
	private NewsService newsService;
	
	
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String indexDefaut(HttpServletRequest request, ModelAndView modelview) {
 		return adminLogin(request, modelview);
	}

	@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
	public String adminLogin(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/login";
	}

	
	
	@RequestMapping(value = "/admin/demand", method = RequestMethod.GET)
	public String adminDemand(HttpServletRequest request, ModelAndView modelview) {
		return "/admin/demand";
	}

	@RequestMapping(value = "/admin/achievement", method = RequestMethod.GET)
	public String adminAchievement(HttpServletRequest request, ModelAndView modelview) {
		return "/admin/achievement";
	}
	

	@RequestMapping(value = "/admin/set", method = RequestMethod.GET)
	public String adminSet(HttpServletRequest request, ModelAndView modelview) {
		return "/admin/set";
	}

	@RequestMapping(value = "/admin/userManage", method = RequestMethod.GET)
	public ModelAndView adminUserManage(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/userManage");
		return modelview;
	}
	
	@RequestMapping(value = "/admin/customer", method = RequestMethod.GET)
	public ModelAndView adminCustomer(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/customer");
		return modelview;
	}

	@RequestMapping(value = "/admin/servicesManage/technology", method = RequestMethod.GET)
	public ModelAndView adminServicesManageTechnology(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/servicesManage/technology");
		return modelview;
	}

	@RequestMapping(value = "/admin/servicesManage/patent", method = RequestMethod.GET)
	public ModelAndView adminServicesManagePatent(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/servicesManage/patent");
		return modelview;
	}

	@RequestMapping(value = "/admin/servicesManage/contract", method = RequestMethod.GET)
	public ModelAndView adminServicesManageContract(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/servicesManage/contract");
		return modelview;
	}

	@RequestMapping(value = "/admin/servicesManage/highTech", method = RequestMethod.GET)
	public ModelAndView adminServicesManageHighTech(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/servicesManage/highTech");
		return modelview;
	}


	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/servicesManage/copyright");
		return modelview;
	}
	
	@RequestMapping(value = "/admin/servicesManage/projectOrder", method = RequestMethod.GET)
	public ModelAndView adminServiceManageProjectOrder(HttpServletRequest request, ModelAndView modelview){
		modelview.setViewName("/admin/servicesManage/projectOrder");
		return modelview;
	}
	
	@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
	public ModelAndView adminHome(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/index");
		return modelview;
	}

	@RequestMapping(value = "/admin/idea", method = RequestMethod.GET)
	public ModelAndView adminIdea(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/idea");
		return modelview;
	}

	@RequestMapping(value = "/admin/userOrder", method = RequestMethod.GET)
	public ModelAndView adminUserOrder(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/userOrder");
		return modelview;
	}
	
	@RequestMapping(value = "/admin/order", method = RequestMethod.GET)
	public ModelAndView adminOrder(HttpServletRequest request, ModelAndView modelview){
		modelview.setViewName("/admin/order");
		return modelview;
	}
	@RequestMapping(value = "/admin/project", method = RequestMethod.GET)
	public ModelAndView adminProject(HttpServletRequest request, ModelAndView modelview){
		modelview.setViewName("/admin/project");
		return modelview;
	}

	@RequestMapping(value = "/admin/operate", method = RequestMethod.GET)
	public ModelAndView adminOperate(HttpServletRequest request, ModelAndView modelview){
		modelview.setViewName("/admin/operate");
		return modelview;
	}
	
	
	@RequestMapping(value = "/admin/statistics", method = RequestMethod.GET)
	public ModelAndView adminStatistics(HttpServletRequest request, ModelAndView modelview) {
		modelview.setViewName("/admin/statistics");
		return modelview;
	}
	
}
