Esempio n. 1
0
 /**
  * @param page
  * @param model
  * @return @Description:菜单列表 @Author:zhangnan#symdata @Since:2015年9月8日 下午3:23:22 @Version:1.0
  */
 @RequiresPermissions("power:menu:view")
 @RequestMapping(value = "/list")
 public String list(Integer page, ModelMap model) throws DatabaseException {
   List<Menu> pageList = menuService.findAll();
   model.addAttribute("page", JsonMapper.nonDefaultMapper().toJson(pageList));
   return "menu/list";
 }
 /**
  * @Title: dataFieldAdd @Description: 添加字段 @Autohr guoxuelian#symdata.cn
  *
  * @param @param model
  * @param @return
  * @return String
  * @throws 2015年9月12日下午2:58:31
  */
 @RequiresPermissions("power:datafield:add")
 @RequestMapping(value = "/dataFieldAdd")
 public String dataFieldAdd(Model model) throws DatabaseException {
   List<Menu> pageList = menuService.findAll();
   model.addAttribute("page", JsonMapper.nonDefaultMapper().toJson(pageList));
   return "datafield/add";
 }
 /**
  * @Title: perModify @Description: 编辑操作 @Autohr guoxuelian#symdata.cn
  *
  * @param @param dataField
  * @param @param model
  * @param @return
  * @return String
  * @throws 2015年9月12日下午3:10:57
  */
 @RequiresPermissions("power:datafield:edit")
 @RequestMapping(value = "/edit")
 public String editDataField(DataField dataField, ModelMap model) throws DatabaseException {
   List<Menu> pageList = menuService.findAll();
   dataField = dataFieldService.findOne(dataField.getId());
   model.addAttribute("dataField", dataField);
   model.addAttribute("page", JsonMapper.nonDefaultMapper().toJson(pageList));
   return "datafield/edit";
 }
 /**
  * @Title: list @Description: 字段列表 @Autohr guoxuelian#symdata.cn
  *
  * @param @param dataField
  * @param @param page
  * @param @param model
  * @param @return
  * @return String
  * @throws 2015年9月12日下午2:58:16
  */
 @RequiresPermissions("power:datafield:view")
 @RequestMapping(value = "/list")
 public String list(DataField dataField, Integer page, ModelMap model) throws DatabaseException {
   List<Menu> menuList = menuService.findAll();
   Page<DataField> pageList = dataFieldService.findDataFieldByHql(dataField, page);
   model.addAttribute("menuList", JsonMapper.nonDefaultMapper().toJson(menuList)); // 菜单列表
   model.addAttribute("page", pageList);
   model.addAttribute("dataField", dataField);
   return "datafield/list";
 }