@RequestMapping(value = "create", method = RequestMethod.GET) public String create(Model model) { List<CourseCategory> categorys = courseCategorySevice.getAllCourseCategory(); List<CourseType> types = courseTypeService.getAllCourseType(); model.addAttribute("categorys", categorys); model.addAttribute("types", types); return "user/designcourse/create"; }
@RequestMapping(value = "modify", method = RequestMethod.GET) public String modify(String id, Model model) { Course course = courseService.findOne(id); List<CourseCategory> categorys = courseCategorySevice.getAllCourseCategory(); List<CourseType> types = courseTypeService.getAllCourseType(); model.addAttribute("categorys", categorys); model.addAttribute("types", types); model.addAttribute("course", course); return "user/designcourse/modify"; }