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
ea86e08e
Commit
ea86e08e
authored
May 09, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志过滤运营和品牌方
parent
059a5fda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
4 deletions
+43
-4
UserApiService.java
...pi/src/main/java/com/gic/auth/service/UserApiService.java
+10
-0
UserApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
+9
-0
MenuController.java
...main/java/com/gic/auth/web/controller/MenuController.java
+24
-4
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/service/UserApiService.java
View file @
ea86e08e
...
...
@@ -195,6 +195,16 @@ public interface UserApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.UserDTO>>
*/
ServiceResponse
<
List
<
UserDTO
>>
listGicUser
(
Integer
enterpriseId
);
/**
* 运维账户
* @Title: listOperationUser
* @Description:
* @author guojuxing
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.UserDTO>>
*/
ServiceResponse
<
List
<
UserDTO
>>
listOperationUser
(
Integer
enterpriseId
);
/**
* 查询全部
* @Title: listUser
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
View file @
ea86e08e
...
...
@@ -453,6 +453,15 @@ public class UserApiServiceImpl implements UserApiService {
}
@Override
public
ServiceResponse
<
List
<
UserDTO
>>
listOperationUser
(
Integer
enterpriseId
)
{
List
<
TabSysUser
>
list
=
userService
.
listGicUser
(
enterpriseId
,
1
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
UserDTO
.
class
,
list
));
}
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
@Override
public
ServiceResponse
<
List
<
UserDTO
>>
listUser
(
Integer
enterpriseId
)
{
List
<
TabSysUser
>
list
=
userService
.
listGicUser
(
enterpriseId
,
null
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/MenuController.java
View file @
ea86e08e
...
...
@@ -223,7 +223,10 @@ public class MenuController {
public
RestResponse
listOperationLog
(
String
startTime
,
String
endTime
,
Integer
menuId
,
String
search
,
PageQO
pageQO
)
throws
ParseException
{
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
Integer
enterpriseId
=
userDetail
.
getEnterpriseId
();
//是否是超级管理员
boolean
isSuperAdmin
=
userDetail
.
getUserInfo
().
getSuperAdmin
().
intValue
()
==
1
;
LogSearchDTO
searchParam
=
new
LogSearchDTO
();
searchParam
.
setEnterpriseId
(
Long
.
valueOf
(
enterpriseId
));
...
...
@@ -233,7 +236,6 @@ public class MenuController {
}
else
{
//权限控制
List
<
Long
>
relationIdList
=
new
ArrayList
<>();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
//权限控制
ServiceResponse
<
List
<
MenuDTO
>>
gicResult
=
menuApiService
.
getUserMenuOfGicNotTree
(
userDetail
.
getEnterpriseId
(),
userDetail
.
getUserId
(),
null
,
...
...
@@ -243,7 +245,6 @@ public class MenuController {
relationIdList
.
addAll
(
Optional
.
ofNullable
(
gicMenuList
).
orElse
(
new
ArrayList
<>()).
stream
()
.
mapToLong
(
e
->
e
.
getMenuId
()).
boxed
().
collect
(
Collectors
.
toList
()));
}
boolean
isSuperAdmin
=
userDetail
.
getUserInfo
().
getSuperAdmin
().
intValue
()
==
1
;
ServiceResponse
<
List
<
MenuDTO
>>
appResult
;
if
(
isSuperAdmin
)
{
appResult
=
menuApiService
.
listAppPageOfHasBuy
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
...
...
@@ -269,9 +270,28 @@ public class MenuController {
searchParam
.
setLogTimeEnd
(
sdf
.
parse
(
endTime
));
}
//用于过滤
List
<
String
>
matchPhoneList
=
new
ArrayList
<>();
//过滤运营操作,如果是品牌方登录;过滤品牌方日志,如果是运营登录
if
(
isSuperAdmin
)
{
ServiceResponse
<
List
<
UserDTO
>>
userResult
;
if
(
userDetail
.
getUserInfo
().
getLoginType
().
intValue
()
==
0
)
{
userResult
=
userApiService
.
listGicUser
(
enterpriseId
);
}
else
{
userResult
=
userApiService
.
listOperationUser
(
enterpriseId
);
}
if
(
userResult
.
isSuccess
())
{
List
<
UserDTO
>
userList
=
userResult
.
getResult
();
matchPhoneList
=
userList
.
stream
()
.
filter
(
e
->
e
.
getEnterpriseId
().
intValue
()
==
enterpriseId
.
intValue
())
.
map
(
e
->
e
.
getPhoneNumber
())
.
collect
(
Collectors
.
toList
());
}
}
searchParam
.
setPhoneList
(
matchPhoneList
);
ServiceResponse
<
Page
<
SystemSetLogDTO
>>
response
=
logApiService
.
listSystemSetLog
(
pageQO
.
getPageSize
(),
pageQO
.
getCurrentPage
(),
searchParam
);
return
ResultControllerUtils
.
commonPageResult
(
response
,
LogListVO
.
class
);
}
...
...
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