/** * 创建 * * @param role * @return String */ @RequiresPermissions("role:create") @RequestMapping(value = "/create", method = RequestMethod.GET) public String Create(WRole role, ModelMap model) { List<cn.uuf.stu.entity.framework.WResource> resources = resourceService.getAll(); List<RoleScope> roleScopeList = roleScopeService.getAll(); model.put("rcList", roleScopeList); model.put("resources", resources); model.put("role", role); return "/admin/role/create"; }
/** * 编辑 * * @param id * @param model * @param redirectAttributes * @return String */ @RequiresPermissions("role:edit") @RequestMapping(value = "/edit", method = RequestMethod.GET) public String edit(Long id, ModelMap model, RedirectAttributes redirectAttributes) { WRole role = roleService.load(id); List<cn.uuf.stu.entity.framework.WResource> resources = resourceService.getAll(); List<RoleScope> roleScopeList = roleScopeService.getAll(); model.put("rcList", roleScopeList); model.put("role", role); model.put("resources", resources); return "/admin/role/edit"; }