@RequestMapping(method = RequestMethod.GET, value = "prizes") public String prizes( @PathVariable String matchId, @RequestParam(required = false, defaultValue = "1") int pageIndex, @RequestParam(required = false, defaultValue = "15") int pageSize, Model model) throws Exception { model.addAttribute(matchService.getMatch(matchId)); MPrize prize = new MPrize(); prize.setMatchId(matchId); PageList<MPrize> prizeList = prizeService.getPrizes(prize); model.addAttribute("list", prizeList); return "match/prize/prizes"; }
@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(); }
@RequestMapping(method = RequestMethod.POST, value = "/applicant") public void saveDepartment(MPrize prize, Model model) throws Exception { applicantDepartmentService.save(prize.getApplicationDepartmentList()); }