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
f5300a1d
Commit
f5300a1d
authored
Jun 04, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询门店
parent
b987f141
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
169 additions
and
5 deletions
+169
-5
MenuListQO.java
...rm-auth-api/src/main/java/com/gic/auth/qo/MenuListQO.java
+16
-0
UserMenuQO.java
...rm-auth-api/src/main/java/com/gic/auth/qo/UserMenuQO.java
+133
-0
MenuApiService.java
...pi/src/main/java/com/gic/auth/service/MenuApiService.java
+3
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+0
-0
TabSysMenuMapper.xml
...th-service/src/main/resources/mapper/TabSysMenuMapper.xml
+6
-0
MenuController.java
...main/java/com/gic/auth/web/controller/MenuController.java
+11
-5
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/qo/MenuListQO.java
View file @
f5300a1d
package
com
.
gic
.
auth
.
qo
;
import
java.util.List
;
/**
* 菜单权限树数据
* @ClassName: MenuListQO
...
...
@@ -43,6 +45,11 @@ public class MenuListQO extends PageQO{
*/
private
Integer
menuId
;
/**
* 1:管理员权限集 2:商户级超管及达摩侧人员 3:仅达摩侧人员
*/
private
List
<
Integer
>
authTypeList
;
public
String
getSearch
()
{
return
search
;
}
...
...
@@ -106,4 +113,13 @@ public class MenuListQO extends PageQO{
public
void
setMenuId
(
Integer
menuId
)
{
this
.
menuId
=
menuId
;
}
public
List
<
Integer
>
getAuthTypeList
()
{
return
authTypeList
;
}
public
MenuListQO
setAuthTypeList
(
List
<
Integer
>
authTypeList
)
{
this
.
authTypeList
=
authTypeList
;
return
this
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/qo/UserMenuQO.java
0 → 100644
View file @
f5300a1d
package
com
.
gic
.
auth
.
qo
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
public
class
UserMenuQO
{
private
static
final
long
serialVersionUID
=
2570558155342976221L
;
/**
* 商户ID
*/
private
Integer
enterpriseId
;
/**
* 商户基础服务版本号
*/
private
String
baseVersionCode
;
/**
* 登录用户ID
*/
private
Integer
userId
;
/**
* 当前菜单ID,一般不用该参数
*/
private
Integer
currentMenu
;
/**
* 应用ID,用于过滤应用菜单
*/
private
String
appId
;
/**
* 登录运营人员所在的部门职位列表
* 元素:部门code-职位code,例如 D1-P1
*/
private
Set
<
String
>
departPosition
;
private
boolean
isGic
;
/**
* 是否构建树结构
*/
private
boolean
isNeedTree
;
/**
* 是否是达摩侧人员
*/
private
boolean
isOperationUser
;
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
UserMenuQO
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
return
this
;
}
public
String
getBaseVersionCode
()
{
return
baseVersionCode
;
}
public
UserMenuQO
setBaseVersionCode
(
String
baseVersionCode
)
{
this
.
baseVersionCode
=
baseVersionCode
;
return
this
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
UserMenuQO
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
return
this
;
}
public
Integer
getCurrentMenu
()
{
return
currentMenu
;
}
public
UserMenuQO
setCurrentMenu
(
Integer
currentMenu
)
{
this
.
currentMenu
=
currentMenu
;
return
this
;
}
public
String
getAppId
()
{
return
appId
;
}
public
UserMenuQO
setAppId
(
String
appId
)
{
this
.
appId
=
appId
;
return
this
;
}
public
Set
<
String
>
getDepartPosition
()
{
return
departPosition
;
}
public
UserMenuQO
setDepartPosition
(
Set
<
String
>
departPosition
)
{
this
.
departPosition
=
departPosition
;
return
this
;
}
public
boolean
isGic
()
{
return
isGic
;
}
public
UserMenuQO
setGic
(
boolean
gic
)
{
isGic
=
gic
;
return
this
;
}
public
boolean
isNeedTree
()
{
return
isNeedTree
;
}
public
UserMenuQO
setNeedTree
(
boolean
needTree
)
{
isNeedTree
=
needTree
;
return
this
;
}
public
boolean
isOperationUser
()
{
return
isOperationUser
;
}
public
UserMenuQO
setOperationUser
(
boolean
operationUser
)
{
isOperationUser
=
operationUser
;
return
this
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/service/MenuApiService.java
View file @
f5300a1d
...
...
@@ -8,6 +8,7 @@ import com.gic.auth.dto.MenuDTO;
import
com.gic.auth.qo.AuthItemSaveQO
;
import
com.gic.auth.qo.MenuListQO
;
import
com.gic.auth.qo.MenuOperationItemListQO
;
import
com.gic.auth.qo.UserMenuQO
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -65,6 +66,8 @@ public interface MenuApiService {
ServiceResponse
<
List
<
MenuDTO
>>
getUserMenuOfGic
(
Integer
enterpriseId
,
Integer
userId
,
Integer
currentMenu
,
String
versionCode
);
ServiceResponse
<
List
<
MenuDTO
>>
getUserMenuOfGic
(
UserMenuQO
params
);
/**
* 获取登陆用户的菜单(页面)
* @Title: getUserMenuOfGicNotTree
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
f5300a1d
This diff is collapsed.
Click to expand it.
gic-platform-auth-service/src/main/resources/mapper/TabSysMenuMapper.xml
View file @
f5300a1d
...
...
@@ -323,6 +323,12 @@
<if
test=
"versionCode != null and versionCode != '' "
>
and menu_version like concat('%_', #{versionCode}, '_%' )
</if>
<if
test=
"authTypeList != null and authTypeList.size() > 0"
>
and auth_type in
<foreach
close=
")"
collection=
"authTypeList"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
#{item}
</foreach>
</if>
order by level,sort
</select>
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/MenuController.java
View file @
f5300a1d
...
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.auth.constant.MenuLevelConstants
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.qo.UserMenuQO
;
import
com.gic.auth.service.CollaboratorApiService
;
import
com.gic.auth.service.MenuApiService
;
import
com.gic.auth.service.MenuItemApiService
;
...
...
@@ -61,10 +62,14 @@ public class MenuController {
*/
@RequestMapping
(
"login-user-menu"
)
public
RestResponse
loginUserMenu
(
Integer
currentMenu
)
{
Integer
userId
=
UserDetailUtils
.
getUserDetail
().
getUserId
();
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
ServiceResponse
<
List
<
MenuDTO
>>
userMenu
=
this
.
menuApiService
.
getUserMenuOfGic
(
enterpriseId
,
userId
,
currentMenu
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getVersionCode
());
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
Integer
userId
=
userDetail
.
getUserId
();
Integer
enterpriseId
=
userDetail
.
getEnterpriseId
();
ServiceResponse
<
List
<
MenuDTO
>>
userMenu
=
this
.
menuApiService
.
getUserMenuOfGic
(
new
UserMenuQO
()
.
setEnterpriseId
(
enterpriseId
)
.
setBaseVersionCode
(
userDetail
.
getEnterpriseInfo
().
getVersionCode
())
.
setUserId
(
userId
));
if
(
userMenu
.
isSuccess
())
{
return
RestResponse
.
success
(
userMenu
.
getResult
());
}
...
...
@@ -191,7 +196,8 @@ public class MenuController {
public
RestResponse
listMenuPageTree
()
{
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
//权限控制
ServiceResponse
<
List
<
MenuDTO
>>
result
=
menuApiService
.
getUserMenuOfGicNotTree
(
userDetail
.
getEnterpriseId
(),
ServiceResponse
<
List
<
MenuDTO
>>
result
=
menuApiService
.
getUserMenuOfGicNotTree
(
userDetail
.
getEnterpriseId
(),
userDetail
.
getUserId
(),
null
,
userDetail
.
getEnterpriseInfo
().
getVersionCode
());
if
(
result
.
isSuccess
())
{
return
RestResponse
...
...
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