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
844ec7b3
Commit
844ec7b3
authored
Nov 18, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限项操作修复
parent
a57efe7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
MenuServiceImpl.java
.../main/java/com/gic/auth/service/impl/MenuServiceImpl.java
+3
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+1
-1
LoginController.java
...ain/java/com/gic/auth/web/controller/LoginController.java
+5
-1
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/MenuServiceImpl.java
View file @
844ec7b3
...
@@ -104,6 +104,9 @@ public class MenuServiceImpl implements MenuService {
...
@@ -104,6 +104,9 @@ public class MenuServiceImpl implements MenuService {
@Override
@Override
public
List
<
TabSysMenu
>
selectByIds
(
List
<
Integer
>
menuIdList
)
{
public
List
<
TabSysMenu
>
selectByIds
(
List
<
Integer
>
menuIdList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
menuIdList
))
{
return
new
ArrayList
<>();
}
return
tabSysMenuMapper
.
selectByIds
(
menuIdList
);
return
tabSysMenuMapper
.
selectByIds
(
menuIdList
);
}
}
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
844ec7b3
...
@@ -962,7 +962,7 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -962,7 +962,7 @@ public class MenuApiServiceImpl implements MenuApiService {
//已配置的操作项需要权限控制
//已配置的操作项需要权限控制
for
(
MenuDTO
menuDTO
:
operationItemListOfAuthItem
)
{
for
(
MenuDTO
menuDTO
:
operationItemListOfAuthItem
)
{
if
(!
operationItemMap
.
containsKey
(
menuDTO
.
getMenuId
())
||
StringUtils
.
isBlank
(
versionCode
)
if
(!
operationItemMap
.
containsKey
(
menuDTO
.
getMenuId
())
||
StringUtils
.
isBlank
(
versionCode
)
||
menuDTO
.
getMenuVersion
().
contains
(
"_"
+
versionCode
+
"_"
))
{
||
!
menuDTO
.
getMenuVersion
().
contains
(
"_"
+
versionCode
+
"_"
))
{
//如果不存在,或者操作项的版本不对
//如果不存在,或者操作项的版本不对
//则是没有权限的操作项
//则是没有权限的操作项
resultList
.
add
(
menuDTO
);
resultList
.
add
(
menuDTO
);
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/LoginController.java
View file @
844ec7b3
...
@@ -9,6 +9,7 @@ import java.util.Map;
...
@@ -9,6 +9,7 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.gic.auth.constant.LoginUserTypeEnum
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.LogManager
;
import
org.apache.log4j.LogManager
;
...
@@ -64,7 +65,10 @@ public class LoginController {
...
@@ -64,7 +65,10 @@ public class LoginController {
}
else
{
}
else
{
List
<
Integer
>
idList
=
new
ArrayList
<>();
List
<
Integer
>
idList
=
new
ArrayList
<>();
for
(
UserDTO
userDTO
:
result
)
{
for
(
UserDTO
userDTO
:
result
)
{
idList
.
add
(
userDTO
.
getEnterpriseId
());
//gic管理员,不查询运营实施
if
(
userDTO
.
getLoginType
().
intValue
()
==
LoginUserTypeEnum
.
GIC_USER
.
getCode
())
{
idList
.
add
(
userDTO
.
getEnterpriseId
());
}
}
}
ServiceResponse
<
List
<
EnterpriseDTO
>>
serviceResponse
=
this
.
enterpriseApiService
ServiceResponse
<
List
<
EnterpriseDTO
>>
serviceResponse
=
this
.
enterpriseApiService
.
listEnterpriseByIds
(
idList
);
.
listEnterpriseByIds
(
idList
);
...
...
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