|
|
@ -46,6 +46,7 @@ public class PaperController {
|
|
|
|
@RequestMapping(value = {"paperlist/{subjectId}-{courseId}-{paperType}-{year}-{area}-{pageNum}"}, method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = {"paperlist/{subjectId}-{courseId}-{paperType}-{year}-{area}-{pageNum}"}, method = RequestMethod.GET)
|
|
|
|
public ModelAndView indexAction(@PathVariable String subjectId , @PathVariable String courseId , @PathVariable String paperType,
|
|
|
|
public ModelAndView indexAction(@PathVariable String subjectId , @PathVariable String courseId , @PathVariable String paperType,
|
|
|
|
@PathVariable String year , @PathVariable String area , @PathVariable Integer pageNum, ModelAndView model) {
|
|
|
|
@PathVariable String year , @PathVariable String area , @PathVariable Integer pageNum, ModelAndView model) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
model.setViewName("paperlist");
|
|
|
|
model.setViewName("paperlist");
|
|
|
|
|
|
|
|
|
|
|
|
CourseEntity course = iCourseService.find(courseId);
|
|
|
|
CourseEntity course = iCourseService.find(courseId);
|
|
|
@ -68,10 +69,16 @@ public class PaperController {
|
|
|
|
model.addObject("year", year);
|
|
|
|
model.addObject("year", year);
|
|
|
|
model.addObject("area", area);
|
|
|
|
model.addObject("area", area);
|
|
|
|
return model;
|
|
|
|
return model;
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
model.setViewName("404");
|
|
|
|
|
|
|
|
return model;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = {"/paper/{paperId}.html"}, method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = {"/paper/{paperId}.html"}, method = RequestMethod.GET)
|
|
|
|
public ModelAndView indexAction(@PathVariable String paperId , ModelAndView model){
|
|
|
|
public ModelAndView indexAction(@PathVariable String paperId , ModelAndView model){
|
|
|
|
|
|
|
|
try {
|
|
|
|
model.setViewName("paper");
|
|
|
|
model.setViewName("paper");
|
|
|
|
PaperEntity paper = iPaperService.find(paperId);
|
|
|
|
PaperEntity paper = iPaperService.find(paperId);
|
|
|
|
model.addObject("paper", paper);
|
|
|
|
model.addObject("paper", paper);
|
|
|
@ -85,6 +92,11 @@ public class PaperController {
|
|
|
|
model.addObject("yatiPaperList", iPaperService.featuredPaper(TamguoConstant.YATI_PAPER_ID, paper.getSubjectId()));
|
|
|
|
model.addObject("yatiPaperList", iPaperService.featuredPaper(TamguoConstant.YATI_PAPER_ID, paper.getSubjectId()));
|
|
|
|
model.addObject("hotPaperList", iPaperService.findHotPaper(paper.getSubjectId(), paper.getCourseId()));
|
|
|
|
model.addObject("hotPaperList", iPaperService.findHotPaper(paper.getSubjectId(), paper.getCourseId()));
|
|
|
|
return model;
|
|
|
|
return model;
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
model.setViewName("404");
|
|
|
|
|
|
|
|
return model;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = {"/paper/area/{areaId}-{type}.html"}, method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = {"/paper/area/{areaId}-{type}.html"}, method = RequestMethod.GET)
|
|
|
|