use of com.artlongs.sys.model.SysRole in project act-eagle-allone by mailtous.
the class SysRoleController method edit.
@GetAction("edit_box/{id}")
public RenderAny edit(@Param(defLongVal = -1) Long id) {
SysRole sysRole = new SysRole();
// -1:新增
sysRole.setId(id);
if (id > 0) {
sysRole = sysRoleService.get(new Long(id));
}
return render("edit_box.html", sysRole);
}
use of com.artlongs.sys.model.SysRole in project act-eagle-allone by mailtous.
the class SysUserController method role_edit.
/**
* 角色分配窗口页
* @param id
* @return
*/
@GetAction("role_box/{userId}")
public RenderAny role_edit(Long userId) {
SysUser sysUser = sysUserService.get(userId);
List<SysRole> sysRoleList = sysRoleService.getAllOfList();
ctx.renderArg("sysRoleList", sysRoleList);
ctx.renderArg("sysUser", sysUser);
ctx.renderArg("roleMap", sysUser.hasRoleMap());
return render("role_box.html");
}
use of com.artlongs.sys.model.SysRole in project act-eagle-allone by mailtous.
the class SysFuncController method perm_edit.
/**
* 权限分配窗口页
* @param id
* @return
*/
@GetAction("perm_box/{funcId}")
public RenderAny perm_edit(Long funcId) {
SysFunc sysFunc = sysFuncService.get(new Long(funcId));
List<SysRole> sysRoleList = sysRoleService.getAllOfList();
List<Long> roleIds = sysPermissionService.getRoleIdsOfFuncId(funcId);
Map<Long, Boolean> roleMap = sysPermissionService.roleMapOfpermission(roleIds);
ctx.renderArg("sysRoleList", sysRoleList);
ctx.renderArg("sysFunc", sysFunc);
ctx.renderArg("roleMap", roleMap);
return render("perm_box.html");
}
use of com.artlongs.sys.model.SysRole in project act-eagle-allone by mailtous.
the class SysRoleService method realDel.
public R realDel(Long id) {
SysRole sysRole = get(id);
if (null == sysRole) {
return R.fail("找不到对应的角色!");
}
List<SysPermission> permissionList = permissionService.getPermissionList(id);
if (C.notEmpty(permissionList)) {
return R.fail("角色已经分配了权限,不允许删除。");
}
return R.tf(sysRoleDao.realDel(id));
}
Aggregations