示例#1
0
  @RequestMapping(value = "/toSearch.do", method = RequestMethod.POST)
  public @ResponseBody List<MatchInfo> toSearch(
      @RequestParam("match_date") String match_date,
      @RequestParam("hm_name") String hm_name,
      @RequestParam("aw_name") String aw_name,
      @RequestParam("hm_conference") String hm_conference,
      @RequestParam("hm_division") String hm_division,
      @RequestParam("aw_conference") String aw_conference,
      @RequestParam("aw_division") String aw_division,
      @RequestParam("winner") String winner) {

    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    List<MatchInfo> infoList =
        dao.doSearch(
            match_date,
            hm_name,
            aw_name,
            hm_conference,
            hm_division,
            aw_conference,
            aw_division,
            winner);

    return infoList;
  }
示例#2
0
  @RequestMapping("/toMatchInfo.do")
  public String toMatchInfo(Model model) {
    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    List<MatchInfo> infoList = dao.doShow();
    model.addAttribute("list", infoList);

    return "success";
  }
示例#3
0
  @RequestMapping(value = "/toQueryReview.do", method = RequestMethod.GET)
  public @ResponseBody Map<String, Object> toQueryReview(@RequestParam("matchid") int matchid) {

    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    Map<String, Object> matchReview = dao.getMatchReview(matchid);

    return matchReview;
  }
示例#4
0
  @RequestMapping(value = "/toLoadMatchInfoAndFeature.do", method = RequestMethod.GET)
  public @ResponseBody InfoAndFeature toLoadMatchInfoAndFeature(
      @RequestParam("matchid") int matchid) {

    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    InfoAndFeature infoAndFeature = dao.loadMatchInfoAndFeature(matchid);

    return infoAndFeature;
  }