Beispiel #1
0
 /**
  * 更新项目信息
  *
  * @param item
  * @return
  */
 @RequestMapping(
     value = "/update",
     method = {RequestMethod.POST})
 public ModelAndView update(@ModelAttribute com.bookmark.domain.Item item) {
   itemService.update(item);
   return list(1);
 }
Beispiel #2
0
 /**
  * 项目列表
  *
  * @param page
  * @return
  */
 @RequestMapping("/list/{page}")
 public ModelAndView list(@PathVariable("page") int page) {
   List<com.bookmark.domain.Item> itemList = itemService.list(page, DEFAULT_PAGESIZE);
   ModelAndView mav = new ModelAndView("/WEB-INF/pages/index.jsp");
   mav.addObject("items", itemList);
   return mav;
 }
Beispiel #3
0
 /**
  * 创建项目
  *
  * @param item
  * @return
  */
 @RequestMapping(
     value = "/create",
     method = {RequestMethod.POST},
     produces = {"application/json"})
 public ModelAndView create(@ModelAttribute com.bookmark.domain.Item item) {
   itemService.create(item);
   return list(1);
 }
Beispiel #4
0
 /**
  * 删除项目
  *
  * @param id
  * @return
  */
 @RequestMapping("/delete/{id}")
 public ModelAndView delete(@PathVariable("id") int id) {
   itemService.delete(id);
   return list(1);
 }