예제 #1
0
 @RequestMapping(method = RequestMethod.GET, value = "{prizeId}")
 public String prize(@PathVariable String prizeId, Model model) throws Exception {
   MPrize prize = prizeService.getPrize(prizeId);
   model.addAttribute("prize", prize);
   model.addAttribute("match", matchService.getMatches(new Match()));
   return "match/prize/prize";
 }
예제 #2
0
  @RequestMapping(method = RequestMethod.GET, value = "{prizeId}/applicantInfo")
  public String applicant(@PathVariable String prizeId) throws Exception {

    MPrize prize = prizeService.getPrize(prizeId);
    String forward = "";

    if (MPrize.PRIZE_TYPE_PERSON.equals(prize.getPrizeType())) {
      forward = "redirect:/personPrize";
    }

    if (MPrize.PRIZE_TYPE_TEAM.equals(prize.getPrizeType())) {
      forward = "redirect:/teamPrize";
    }

    if (MPrize.PRIZE_TYPE_PROJECT.equals(prize.getPrizeType())) {
      forward = "redirect:/projectPrize";
    }

    if (MPrize.PRIZE_TYPE_PROJECT_ACHIEVEMENT.equals(prize.getPrizeType())) {
      forward = "redirect:/projectAchievement";
    }

    return forward + "?prize.prizeId=" + prizeId + "&prize.matchId=" + prize.getMatchId();
  }