Exemplo n.º 1
0
 /**
  * 跳转到新增界面
  *
  * @return
  */
 @RequestMapping("addUI")
 public String addUI(Model model) {
   List<Resource> resources = resourceService.queryAll(new Resource());
   model.addAttribute("resources", resources);
   Dic dic = new Dic();
   dic.setDicTypeKey("res_type");
   model.addAttribute("dics", dicService.queryAll(dic));
   return Common.BACKGROUND_PATH + "/resource/add";
 }
Exemplo n.º 2
0
 /**
  * 跳转到修改界面
  *
  * @param model
  * @param resourceId 修改菜单信息ID
  * @return
  */
 @RequestMapping("editUI")
 public String editUI(Model model, String resourceId) {
   List<Resource> resources = resourceService.queryAll(new Resource());
   model.addAttribute("resources", resources);
   Resource resource = resourceService.getById(resourceId);
   model.addAttribute("cur", resource);
   Dic dic = new Dic();
   dic.setDicTypeKey("res_type");
   model.addAttribute("dics", dicService.queryAll(dic));
   return Common.BACKGROUND_PATH + "/resource/edit";
 }