Пример #1
0
 /** 更新 */
 @RequestMapping(value = "/update", method = RequestMethod.POST)
 public String udpate(DeliveryTemplate deliveryTemplate, RedirectAttributes redirectAttributes) {
   if (!isValid(deliveryTemplate)) {
     return ERROR_VIEW;
   }
   deliveryTemplateService.update(deliveryTemplate);
   addFlashMessage(redirectAttributes, SUCCESS_MESSAGE);
   return "redirect:list.jhtml";
 }
Пример #2
0
 /** 删除 */
 @RequestMapping(value = "/delete", method = RequestMethod.POST)
 public @ResponseBody Message delete(Long[] ids) {
   deliveryTemplateService.delete(ids);
   return SUCCESS_MESSAGE;
 }
Пример #3
0
 /** 列表 */
 @RequestMapping(value = "/list", method = RequestMethod.GET)
 public String list(Pageable pageable, Model model) {
   model.addAttribute("page", deliveryTemplateService.findPage(pageable));
   return "/admin/delivery_template/list";
 }
Пример #4
0
 /** 编辑 */
 @RequestMapping(value = "/edit", method = RequestMethod.GET)
 public String eidt(Long id, Model model) {
   model.addAttribute("deliveryTemplate", deliveryTemplateService.find(id));
   return "/admin/delivery_template/edit";
 }