Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-auth
Commits
107aaea0
Commit
107aaea0
authored
Sep 19, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限管理接口:应用列表权限
parent
5889d7ff
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
244 additions
and
9 deletions
+244
-9
MenuLevelConstants.java
...c/main/java/com/gic/auth/constant/MenuLevelConstants.java
+4
-0
SignConstants.java
...pi/src/main/java/com/gic/auth/constant/SignConstants.java
+22
-0
MenuDTO.java
...form-auth-api/src/main/java/com/gic/auth/dto/MenuDTO.java
+24
-6
MenuItemDTO.java
...-auth-api/src/main/java/com/gic/auth/dto/MenuItemDTO.java
+93
-0
AuthItemSaveQO.java
...uth-api/src/main/java/com/gic/auth/qo/AuthItemSaveQO.java
+63
-0
MenuListQO.java
...rm-auth-api/src/main/java/com/gic/auth/qo/MenuListQO.java
+24
-0
MenuApiService.java
...pi/src/main/java/com/gic/auth/service/MenuApiService.java
+14
-3
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/constant/MenuLevelConstants.java
View file @
107aaea0
...
...
@@ -15,4 +15,8 @@ public class MenuLevelConstants {
* 第一层级的父级ID值
*/
public
final
static
int
FIRST_LEVEL_PARENT_ID
=
0
;
/**
* 第一层级
*/
public
final
static
int
FIRST_LEVEL
=
1
;
}
gic-platform-auth-api/src/main/java/com/gic/auth/constant/SignConstants.java
0 → 100644
View file @
107aaea0
package
com
.
gic
.
auth
.
constant
;
/**
* 符号
* @ClassName: SignConstants
* @Description:
* @author guojuxing
* @date 2019/9/19 9:33 AM
*/
public
class
SignConstants
{
/**
* 斜杠
*/
public
final
static
String
SLASH
=
"/"
;
/**
* 下划线
*/
public
final
static
String
UNDERLINE
=
"_"
;
/**
* 英文逗号
*/
public
final
static
String
COMMA
=
","
;
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/MenuDTO.java
View file @
107aaea0
...
...
@@ -20,6 +20,12 @@ public class MenuDTO implements Serializable {
}
/**
* 编辑gic子页面参数校验分组
*/
public
interface
UpdateGICChildPageValid
{
}
/**
* 编辑应用页面参数校验分组(应用页面是查询应用列表接口后自动新增)
*/
public
interface
UpdateAppPageValid
{
...
...
@@ -44,6 +50,12 @@ public class MenuDTO implements Serializable {
}
/**
* 编辑操作项参数校验分组
*/
public
interface
UpdateOperationItemValid
{
}
/**
*
*/
private
Integer
menuId
;
...
...
@@ -52,7 +64,8 @@ public class MenuDTO implements Serializable {
* 菜单名称
*/
@NotBlank
(
message
=
"页面名称不能为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
,
SaveAppChildPageValid
.
class
,
EditAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
})
SaveAppChildPageValid
.
class
,
EditAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
,
UpdateGICChildPageValid
.
class
,
UpdateOperationItemValid
.
class
})
private
String
menuName
;
/**
...
...
@@ -64,7 +77,8 @@ public class MenuDTO implements Serializable {
* 菜单路由
*/
@NotBlank
(
message
=
"路径URL不能为空"
,
groups
=
{
SaveGICChildPageValid
.
class
,
SaveAppChildPageValid
.
class
,
EditAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
})
EditAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
,
UpdateGICChildPageValid
.
class
,
UpdateOperationItemValid
.
class
})
private
String
menuUrl
;
/**
...
...
@@ -77,7 +91,8 @@ public class MenuDTO implements Serializable {
/**
* 0当前页1新开页
*/
@NotNull
(
message
=
"打开方式不能为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
})
@NotNull
(
message
=
"打开方式不能为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
,
UpdateGICChildPageValid
.
class
})
private
Integer
target
;
/**
...
...
@@ -103,7 +118,8 @@ public class MenuDTO implements Serializable {
/**
* 是否显示在菜单栏的菜单,0否1是
*/
@NotNull
(
message
=
"页面类型(是否作为菜单)不能改为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
})
@NotNull
(
message
=
"页面类型(是否作为菜单)不能改为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
,
UpdateGICChildPageValid
.
class
})
private
Integer
isShow
;
/**
...
...
@@ -111,7 +127,7 @@ public class MenuDTO implements Serializable {
*/
@NotBlank
(
message
=
"页面code不能为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
,
UpdateAppPageValid
.
class
,
SaveAppChildPageValid
.
class
,
EditAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
})
SaveOperationItemValid
.
class
,
UpdateGICChildPageValid
.
class
,
UpdateOperationItemValid
.
class
})
private
String
menuCode
;
/**
...
...
@@ -123,7 +139,8 @@ public class MenuDTO implements Serializable {
* 多选,例如_1_2_格式,如果是GIC菜单 1gic标准版 2gic集团版;如果是应用菜单 1:基础班 2:高级版
*/
@NotBlank
(
message
=
"版本不能为空"
,
groups
=
{
SavePageValid
.
class
,
SaveGICChildPageValid
.
class
,
SaveAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
})
SaveAppChildPageValid
.
class
,
SaveOperationItemValid
.
class
,
UpdateGICChildPageValid
.
class
,
EditAppChildPageValid
.
class
,
UpdateOperationItemValid
.
class
})
private
String
menuVersion
;
/**
...
...
@@ -134,6 +151,7 @@ public class MenuDTO implements Serializable {
/**
* 应用版本名称
*/
@NotBlank
(
message
=
"应用版本名称不能为空"
,
groups
=
{
EditAppChildPageValid
.
class
,
UpdateOperationItemValid
.
class
})
private
String
menuVersionName
;
private
List
<
MenuDTO
>
children
;
...
...
gic-platform-auth-api/src/main/java/com/gic/auth/dto/MenuItemDTO.java
0 → 100644
View file @
107aaea0
package
com
.
gic
.
auth
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 权限项和操作项关联
* @ClassName: MenuItemDTO
* @Description:
* @author guojuxing
* @date 2019/9/18 5:27 PM
*/
public
class
MenuItemDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8594935569244798777L
;
/**
* ID
*/
private
Integer
menuItemId
;
/**
* 权限项ID(数据是菜单权限表)
*/
private
Integer
menuId
;
/**
* 操作项ID(数据是菜单权限表)
*/
private
Integer
itemId
;
/**
* 1:有效 0:无效
*/
private
Integer
status
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
public
Integer
getMenuItemId
()
{
return
menuItemId
;
}
public
void
setMenuItemId
(
Integer
menuItemId
)
{
this
.
menuItemId
=
menuItemId
;
}
public
Integer
getMenuId
()
{
return
menuId
;
}
public
void
setMenuId
(
Integer
menuId
)
{
this
.
menuId
=
menuId
;
}
public
Integer
getItemId
()
{
return
itemId
;
}
public
void
setItemId
(
Integer
itemId
)
{
this
.
itemId
=
itemId
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/qo/AuthItemSaveQO.java
0 → 100644
View file @
107aaea0
package
com
.
gic
.
auth
.
qo
;
import
com.gic.enterprise.qo.PageQO
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
* 权限项新增/编辑参数
* @ClassName: AuthItemSaveQO
* @Description:
* @author guojuxing
* @date 2019/9/18 5:58 PM
*/
public
class
AuthItemSaveQO
extends
PageQO
{
private
static
final
long
serialVersionUID
=
3155478932998607869L
;
/**
* 新增权限项参数校验分组
*/
public
interface
SaveAuthItemValid
{
}
/**
* 权限项名称
*/
@NotBlank
(
message
=
"权限项名称不能为空"
,
groups
=
{
SaveAuthItemValid
.
class
})
private
String
menuName
;
/**
* 操作项多选,英文逗号隔开
*/
@NotBlank
(
message
=
"操作项不能为空"
,
groups
=
{
SaveAuthItemValid
.
class
})
private
String
operationItemIds
;
/**
* 父级ID
*/
@NotNull
(
message
=
"上级页面不能为空"
,
groups
=
{
SaveAuthItemValid
.
class
})
private
Integer
parentId
;
public
String
getMenuName
()
{
return
menuName
;
}
public
void
setMenuName
(
String
menuName
)
{
this
.
menuName
=
menuName
;
}
public
String
getOperationItemIds
()
{
return
operationItemIds
;
}
public
void
setOperationItemIds
(
String
operationItemIds
)
{
this
.
operationItemIds
=
operationItemIds
;
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/qo/MenuListQO.java
View file @
107aaea0
...
...
@@ -22,6 +22,14 @@ public class MenuListQO extends PageQO{
* 0:页面 1:权限项 2:操作项
*/
private
Integer
menuType
;
/**
* 层级
*/
private
Integer
level
;
/**
* 是否需要更新应用列表数据
*/
private
boolean
isNeedUpdateAppMenu
;
public
String
getSearch
()
{
return
search
;
...
...
@@ -46,4 +54,20 @@ public class MenuListQO extends PageQO{
public
void
setMenuType
(
Integer
menuType
)
{
this
.
menuType
=
menuType
;
}
public
Integer
getLevel
()
{
return
level
;
}
public
void
setLevel
(
Integer
level
)
{
this
.
level
=
level
;
}
public
boolean
isNeedUpdateAppMenu
()
{
return
isNeedUpdateAppMenu
;
}
public
void
setNeedUpdateAppMenu
(
boolean
needUpdateAppMenu
)
{
isNeedUpdateAppMenu
=
needUpdateAppMenu
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/service/MenuApiService.java
View file @
107aaea0
...
...
@@ -3,6 +3,7 @@ package com.gic.auth.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.qo.AuthItemSaveQO
;
import
com.gic.auth.qo.MenuListQO
;
import
com.gic.auth.qo.MenuOperationItemListQO
;
...
...
@@ -42,14 +43,14 @@ public interface MenuApiService {
ServiceResponse
<
List
<
MenuDTO
>>
listMenuTree
(
MenuListQO
params
);
/**
* 查询页面下面的
权限
项列表数据
* @Title: listMenu
Role
ByParentId
* 查询页面下面的
操作
项列表数据
* @Title: listMenu
Item
ByParentId
* @Description:
* @author guojuxing
* @param parentId
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.MenuDTO>>
*/
ServiceResponse
<
List
<
MenuDTO
>>
listMenu
Role
ByParentId
(
Integer
parentId
);
ServiceResponse
<
List
<
MenuDTO
>>
listMenu
Item
ByParentId
(
Integer
parentId
);
/**
* 新增页面
...
...
@@ -176,4 +177,14 @@ public interface MenuApiService {
* @return com.gic.api.base.commons.ServiceResponse<com.gic.auth.dto.MenuDTO>
*/
ServiceResponse
<
MenuDTO
>
getDetailById
(
Integer
menuId
);
/**
* 新增权限项
* @Title: saveAuthItem
* @Description:
* @author guojuxing
* @param params
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
saveAuthItem
(
AuthItemSaveQO
params
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment