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
2a9d4f43
Commit
2a9d4f43
authored
Jun 21, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理员权限集&管理员资源组引用维护调整
parent
c565cea8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
0 deletions
+59
-0
pom.xml
gic-platform-auth-service/pom.xml
+6
-0
UserApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
+47
-0
pom.xml
gic-platform-auth-web/pom.xml
+6
-0
No files found.
gic-platform-auth-service/pom.xml
View file @
2a9d4f43
...
...
@@ -159,6 +159,12 @@
<artifactId>
gic-authcenter-api
</artifactId>
<version>
${gic-authcenter-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-popup-sdk
</artifactId>
<version>
${gic-popup-sdk}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
View file @
2a9d4f43
...
...
@@ -12,11 +12,16 @@ import com.gic.enterprise.dto.union.UnionEnterpriseAuthDTO;
import
com.gic.enterprise.exception.CommonException
;
import
com.gic.enterprise.service.UnionEnterpriseAuthApiService
;
import
com.gic.member.config.api.service.UserGroupPermissionApiService
;
import
com.gic.popup.config.InitPopupConfig
;
import
com.gic.popup.config.PopupUtil
;
import
com.gic.popup.dto.PopupDTO
;
import
com.gic.popup.dto.RelationBusinessInfoDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
...
...
@@ -47,8 +52,18 @@ import com.gic.store.utils.valid.ValidUtil;
* @date 2019/7/16 6:55 PM
*/
@Service
(
"userApiService"
)
@Import
(
value
=
InitPopupConfig
.
class
)
public
class
UserApiServiceImpl
implements
UserApiService
{
private
static
final
Logger
LOGGER
=
LogManager
.
getLogger
(
UserApiServiceImpl
.
class
);
/**
* 管理员权限集引用类型
*/
private
final
static
Integer
REFER_BUSINESS_USER_ROLE
=
4
;
/**
* 管理员资源组
*/
private
final
static
Integer
REFER_BUSINESS_USER_RESOURCE
=
5
;
@Autowired
private
UserService
userService
;
@Autowired
...
...
@@ -523,6 +538,11 @@ public class UserApiServiceImpl implements UserApiService {
accountGroupRelService
.
deleteByUserId
(
userId
,
AccountGroupMemberTypeEnum
.
ADMIN
.
getCode
());
//受审组
auditedGroupUserRelService
.
deleteByUserId
(
userId
);
//删除权限集和资源组引用数据
PopupUtil
.
deletePopupLog
(
tabUser
.
getEnterpriseId
(),
Long
.
valueOf
(
userId
),
REFER_BUSINESS_USER_ROLE
);
PopupUtil
.
deletePopupLog
(
tabUser
.
getEnterpriseId
(),
Long
.
valueOf
(
userId
),
REFER_BUSINESS_USER_RESOURCE
);
userService
.
delete
(
userId
);
try
{
...
...
@@ -917,6 +937,9 @@ public class UserApiServiceImpl implements UserApiService {
return
result
;
}
}
//业务类型配置在:gic-member-config4.0.tab_conf_reference_type
saveRefer
(
userId
,
"管理员权限集"
,
4
,
userRoleIdArr
);
//新增用户资源关联数据
UserResourceDTO
userResourceDTO
=
new
UserResourceDTO
();
userResourceDTO
.
setUserId
(
userId
);
...
...
@@ -933,6 +956,9 @@ public class UserApiServiceImpl implements UserApiService {
return
result
;
}
}
saveRefer
(
userId
,
"管理员资源组"
,
5
,
userResourceIdArr
);
//账号分组用户关联数据维护
if
(
StringUtils
.
isNotBlank
(
accountGroupIds
))
{
ServiceResponse
<
String
[]>
accountGroupIdValid
=
ValidSplitUtils
.
validStr
(
accountGroupIds
);
...
...
@@ -972,4 +998,25 @@ public class UserApiServiceImpl implements UserApiService {
return
tabUser
;
}
/**
*
* @param businessId
* @param businessName
* @param businessType 业务类型配置在:gic-member-config4.0.tab_conf_reference_type
* @param businessReferIdArr
*/
private
void
saveRefer
(
Integer
businessId
,
String
businessName
,
Integer
businessType
,
String
[]
businessReferIdArr
)
{
PopupDTO
popupDTO
=
new
PopupDTO
();
popupDTO
.
setBusinessId
(
Long
.
valueOf
(
businessId
));
popupDTO
.
setBusinessName
(
businessName
);
if
(
businessReferIdArr
!=
null
&&
businessReferIdArr
.
length
>
0
)
{
popupDTO
.
setRelationBusinessIdList
(
Arrays
.
stream
(
businessReferIdArr
).
filter
(
e
->
StringUtils
.
isNotBlank
(
e
))
.
map
(
e
->
new
RelationBusinessInfoDTO
(
businessType
,
Long
.
valueOf
(
e
)))
.
collect
(
Collectors
.
toList
()));
ServiceResponse
response
=
PopupUtil
.
savePopupLog
(
popupDTO
);
LOGGER
.
info
(
"保存数据引用结果:{}"
,
JSON
.
toJSONString
(
response
));
}
}
}
gic-platform-auth-web/pom.xml
View file @
2a9d4f43
...
...
@@ -170,6 +170,12 @@
<artifactId>
gic-mall-share-api
</artifactId>
<version>
${gic-mall-share-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-popup-sdk
</artifactId>
<version>
${gic-popup-sdk}
</version>
</dependency>
</dependencies>
<build>
...
...
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