收集的接口信息返回与授权URI相同的数据字段

This commit is contained in:
Zhaoyang 2020-02-28 15:54:50 +08:00
parent 56d997cfda
commit 88ab1054ce
3 changed files with 14 additions and 2 deletions

View File

@ -36,6 +36,9 @@ public class ApiPermission implements Serializable {
// 接口URI // 接口URI
private String apiUri; private String apiUri;
// 授权URI
private String value;
// 权限许可编码 // 权限许可编码
@JSONField(serialize = false) @JSONField(serialize = false)
private String permissionCode; private String permissionCode;

View File

@ -154,7 +154,7 @@ public class ApiPermissionExtractor {
if(V.notEmpty(urlPrefix)){ if(V.notEmpty(urlPrefix)){
for(String path : urlPrefix.split(Cons.SEPARATOR_COMMA)){ for(String path : urlPrefix.split(Cons.SEPARATOR_COMMA)){
ApiPermission apiPermission = new ApiPermission().setClassName(controllerClass.getName()).setClassTitle(title); ApiPermission apiPermission = new ApiPermission().setClassName(controllerClass.getName()).setClassTitle(title);
apiPermission.setApiMethod(m).setApiName(apiName).setApiUri(path + u).setPermissionCode(permissionCode); apiPermission.setApiMethod(m).setApiName(apiName).setApiUri(path + u).setPermissionCode(permissionCode).setValue(m + ":" + path + u);
apiPermissions.add(apiPermission); apiPermissions.add(apiPermission);
} }
} }

View File

@ -21,7 +21,8 @@ public class Cons extends com.diboot.core.config.Cons {
ORG_TYPE, ORG_TYPE,
PERMISSION_TYPE, PERMISSION_TYPE,
POSITION_GRADE, POSITION_GRADE,
GENDER GENDER,
FRONTEND_PERMISSION_CODE
} }
/** /**
@ -78,6 +79,14 @@ public class Cons extends com.diboot.core.config.Cons {
OTHER OTHER
} }
/**
* 前端权限类型
*/
public static enum FRONTEND_PERMISSION_DISPLAY_TYPE{
MENU,
PERMISSION
}
/** /**
* 应用 * 应用
*/ */