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 org.springframework.web.servlet.view.RedirectView;
import com.goafanti.achievement.service.AchievementService;
import com.goafanti.business.service.BusinessProjectService;
import com.goafanti.common.service.DistrictGlossoryService;
import com.goafanti.common.service.FieldGlossoryService;
import com.goafanti.demand.service.DemandInterestService;
import com.goafanti.demand.service.DemandService;
import com.goafanti.order.service.OrderService;
import com.goafanti.user.service.UserIdentityService;
import com.goafanti.user.service.UserService;

@Controller
public class PortalController extends BaseController {
	@Resource
	private FieldGlossoryService glossoryService;
	@Resource
	private AchievementService achievementService;
	@Resource
	private DemandService demandService;
	@Resource
	UserIdentityService	userIdentityService;
	@Resource
	private FieldGlossoryService fieldGlossoryService;
	@Resource
	private DemandInterestService  demandInterestService;
	@Resource
	private UserService userService;
	@Resource
	private DistrictGlossoryService districtglossoryservice;
	@Resource
	BusinessProjectService	businessProjectService;
	@Resource
	OrderService	orderService;

	@RequestMapping(value = "/index", method = RequestMethod.GET)
	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
		return home(request, modelview);
	}

	@RequestMapping(value = "/", method = RequestMethod.GET)
	public ModelAndView home(HttpServletRequest request, ModelAndView modelview) {
		RedirectView rv = new RedirectView();
		rv.setUrl(request.getContextPath() + "/portal/index");
		rv.setExposeModelAttributes(false);
		modelview.setView(rv);
		return modelview;
	}
	
}
