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
e3bec7f3
Commit
e3bec7f3
authored
Sep 03, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.统一用户信息前缀前缀,为biz
2.key统一放到redisKey 便于维护
parent
cd064445
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+1
-5
RedisKey.java
...java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
+15
-2
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+1
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
e3bec7f3
...
...
@@ -69,7 +69,7 @@ public class ControllerAop {
return
;
}
if
(
token
!=
null
)
{
String
pattern
=
buildPatternKey
(
token
);
String
pattern
=
RedisKey
.
buildPatternKey
(
token
);
//验证token有效性,防止token失效
AgencyUserModel
userModel
;
try
{
...
...
@@ -89,10 +89,6 @@ public class ControllerAop {
}
}
private
String
buildPatternKey
(
String
token
)
{
return
"region_"
+
"*"
+
"_"
+
token
;
}
private
void
saveUserRedis
(
AgencyUserModel
user
,
String
token
)
{
String
authToken
=
RedisKey
.
buildReginKey
(
user
.
getUserId
(),
token
);
if
(
redisUtils
.
hasKey
(
authToken
))
{
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
View file @
e3bec7f3
...
...
@@ -37,12 +37,25 @@ public class RedisKey {
}
/**
* 创建redis key
* 用户新缓存前缀
*/
public
static
final
String
REGION_REDIS_PREFIX
=
"biz"
;
/**
* 创建区域key
* @param token
* @return String
*/
public
static
String
buildReginKey
(
String
userId
,
String
token
)
{
return
"biz_"
+
userId
+
"_"
+
token
;
return
REGION_REDIS_PREFIX
+
userId
+
"_"
+
token
;
}
/**
* 模糊重新区域key
* @param token
* @return
*/
public
static
String
buildPatternKey
(
String
token
)
{
return
REGION_REDIS_PREFIX
+
"*"
+
"_"
+
token
;
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/CheckServiceImpl.java
View file @
e3bec7f3
...
...
@@ -454,7 +454,7 @@ public class CheckServiceImpl implements ICheckService {
target
.
put
(
"planTypeDesc"
,
planTypeEnum
!=
null
?
planTypeEnum
.
getName
()
:
""
);
}
if
(
StringUtil
.
isNotEmpty
(
r
.
getIsOk
()))
{
CheckStatusEnum
checkStatusEnum
=
CheckStatusEnum
.
getEnum
(
r
.
get
PlanType
());
CheckStatusEnum
checkStatusEnum
=
CheckStatusEnum
.
getEnum
(
r
.
get
IsOk
());
target
.
put
(
"isOkDesc"
,
checkStatusEnum
!=
null
?
checkStatusEnum
.
getName
()
:
""
);
}
return
target
;
...
...
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