Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
97e10e91
Commit
97e10e91
authored
Jun 24, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):多角色登录信息失效后重新刷入当时选择的单角色类型
parent
af2c955a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+3
-0
RedisKey.java
...java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
+12
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
97e10e91
...
...
@@ -188,6 +188,9 @@ public class ControllerAop {
mapDepartments
=
user
.
getCompanyDepartments
();
departmentM
=
companyM
!=
null
?
mapDepartments
.
get
(
companyM
.
getSequenceNbr
()).
get
(
0
)
:
null
;
}
if
(!
ValidationUtil
.
isEmpty
(
company
.
getCompanyType
())
&&
redisUtils
.
hasKey
(
RedisKey
.
buildReginRoleKey
(
RequestContext
.
getExeUserId
()))){
company
.
setCompanyType
(
String
.
valueOf
(
redisUtils
.
get
(
RedisKey
.
buildReginRoleKey
(
RequestContext
.
getExeUserId
()))));
}
Bean
.
copyExistPropertis
(
departmentM
,
department
);
Map
<
Long
,
List
<
RoleModel
>>
roles
=
user
.
getOrgRoles
();
Long
sequenceNbr
;
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
View file @
97e10e91
...
...
@@ -56,6 +56,10 @@ public class RedisKey {
*/
public
static
final
String
REGION_REDIS_PREFIX
=
"biz_"
;
/**
* 多角色用户选择的单一角色
*/
public
static
final
String
REGION_ROLE_KEY
=
REGION_REDIS_PREFIX
+
"role_"
;
/**
* 创建区域key
* @param token 权限
* @return String
...
...
@@ -72,6 +76,14 @@ public class RedisKey {
public
static
String
buildPatternKey
(
String
token
)
{
return
REGION_REDIS_PREFIX
+
"*"
+
"_"
+
token
;
}
/**
* 创建多角色用户选择的某一角色key
* @param userId 用户id
* @return String
*/
public
static
String
buildReginRoleKey
(
String
userId
)
{
return
REGION_ROLE_KEY
+
userId
;
}
/**
* 判断str1中包含str2的个数
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
97e10e91
...
...
@@ -1984,6 +1984,7 @@ public class CommonServiceImpl implements ICommonService {
@Override
public
void
updateUnitTypeCache
(
ReginParams
reginParams
,
String
unitType
,
String
selectedRoleSeqs
)
{
reginParams
.
getCompany
().
setCompanyType
(
unitType
);
redisUtils
.
set
(
RedisKey
.
buildReginRoleKey
(
RequestContext
.
getExeUserId
()),
unitType
);
redisUtils
.
set
(
getSelectedRoleRedisKey
(),
selectedRoleSeqs
,
redisRegionTimeSecond
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParams
),
redisRegionTimeSecond
);
}
...
...
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