refactor(权限点):DTO调整;增加接口
This commit is contained in:
parent
8ef9910371
commit
d1c89b7e4d
@ -1,5 +1,6 @@
|
||||
package cn.axzo.tyr.client.model.permission;
|
||||
|
||||
import cn.axzo.basics.common.model.IBaseTree;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@ -12,7 +13,7 @@ import java.util.List;
|
||||
* @date: 2023/9/5 15:20
|
||||
*/
|
||||
@Data
|
||||
public class PermissionPointTreeNode {
|
||||
public class PermissionPointTreeNode implements IBaseTree<PermissionPointTreeNode, Long> {
|
||||
/** 权限点ID **/
|
||||
private Long permissionPointId;
|
||||
|
||||
@ -22,9 +23,36 @@ public class PermissionPointTreeNode {
|
||||
/** 权限点名称 **/
|
||||
private String permissionName;
|
||||
|
||||
/** 排序 **/
|
||||
private Integer sort;
|
||||
|
||||
/** 所属端 **/
|
||||
private String terminal;
|
||||
|
||||
/** 权限点层级path **/
|
||||
private String path;
|
||||
|
||||
/** 下级节点 **/
|
||||
private List<PermissionPointTreeNode> children;
|
||||
|
||||
|
||||
@Override
|
||||
public Long getNodeCode() {
|
||||
return permissionPointId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getParentNodeCode() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PermissionPointTreeNode> getNodeChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNodeChildren(List<PermissionPointTreeNode> nodeChildren) {
|
||||
this.children = nodeChildren;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class PermissionPointTreeQueryReq {
|
||||
|
||||
/** 授权策略 1-平台授权型 2-客户授权型 免授权型, 为空查全部**/
|
||||
/** 授权策略 1-平台授权型 2-客户授权型 3-免授权型, 为空查全部**/
|
||||
private Integer delegateType;
|
||||
|
||||
/** 搜索关键字 - 名称模糊搜索 **/
|
||||
|
||||
@ -13,5 +13,14 @@ import java.util.List;
|
||||
* @date: 2023/9/6 15:51
|
||||
*/
|
||||
public interface PermissionPointService {
|
||||
|
||||
/**
|
||||
* 权限点条件查询 - 未组装为树形
|
||||
* **/
|
||||
List<PermissionPointTreeNode> listTreeNodes(PermissionPointTreeQueryReq request);
|
||||
|
||||
/**
|
||||
* 根据权限点ID查询基本信息
|
||||
* **/
|
||||
List<PermissionPointTreeNode> listNodesByIds(List<Long> permissionIds);
|
||||
}
|
||||
|
||||
@ -40,6 +40,11 @@ public class PermissionPointServiceImpl implements PermissionPointService {
|
||||
return list.stream().map(this::feature2Node).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PermissionPointTreeNode> listNodesByIds(List<Long> permissionIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private PermissionPointTreeNode feature2Node(SaasFeature feature) {
|
||||
PermissionPointTreeNode node = new PermissionPointTreeNode();
|
||||
node.setPermissionPointId(feature.getId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user