【7.6.0】【sys】【permission】整理获取角色权限绑定列表的业务结构

pull/55/MERGE
fengshuonan 2023-06-13 16:19:52 +08:00
parent ee0d7a72cd
commit 1f88b7c743
3 changed files with 73 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import cn.stylefeng.roses.kernel.sys.modular.role.entity.SysRole;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.request.RoleBindPermissionRequest;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.request.SysRoleRequest;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.response.RoleBindPermissionResponse;
import cn.stylefeng.roses.kernel.sys.modular.role.service.PermissionAssignService;
import cn.stylefeng.roses.kernel.sys.modular.role.service.SysRoleService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
@ -29,6 +30,9 @@ public class PermissionAssignController {
@Resource
private SysRoleService sysRoleService;
@Resource
private PermissionAssignService permissionAssignService;
/**
*
* <p>
@ -53,8 +57,8 @@ public class PermissionAssignController {
*/
@GetResource(name = "获取角色绑定的权限列表", path = "/permission/getRoleBindPermission")
public ResponseData<RoleBindPermissionResponse> getRoleBindPermission(@Validated(BaseRequest.detail.class) RoleBindPermissionRequest roleBindPermissionRequest) {
return new SuccessResponseData<>();
RoleBindPermissionResponse roleBindPermission = permissionAssignService.getRoleBindPermission(roleBindPermissionRequest);
return new SuccessResponseData<>(roleBindPermission);
}

View File

@ -0,0 +1,33 @@
package cn.stylefeng.roses.kernel.sys.modular.role.service;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.request.RoleBindPermissionRequest;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.response.RoleBindPermissionResponse;
/**
*
*
* @author fengshuonan
* @since 2023/6/13 16:13
*/
public interface PermissionAssignService {
/**
*
* <p>
*
* 3
*
* @author fengshuonan
* @since 2023/6/13 14:56
*/
RoleBindPermissionResponse getRoleBindPermission(RoleBindPermissionRequest roleBindPermissionRequest);
/**
*
*
* @author fengshuonan
* @since 2023/6/13 16:17
*/
RoleBindPermissionResponse createSelectTreeStructure();
}

View File

@ -0,0 +1,34 @@
package cn.stylefeng.roses.kernel.sys.modular.role.service.impl;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.request.RoleBindPermissionRequest;
import cn.stylefeng.roses.kernel.sys.modular.role.pojo.response.RoleBindPermissionResponse;
import cn.stylefeng.roses.kernel.sys.modular.role.service.PermissionAssignService;
/**
*
*
* @author fengshuonan
* @since 2023/6/13 16:14
*/
public class PermissionAssignServiceImpl implements PermissionAssignService {
@Override
public RoleBindPermissionResponse getRoleBindPermission(RoleBindPermissionRequest roleBindPermissionRequest) {
// 1. 整理出一个总的响应的结构树,选择状态为空
// 2. 获取角色绑定的应用,菜单,功能列表
// 3. 组合结构树和角色绑定的信息,填充选择状态,封装返回结果
return null;
}
@Override
public RoleBindPermissionResponse createSelectTreeStructure() {
return null;
}
}