Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
c80f0408
Commit
c80f0408
authored
Feb 20, 2023
by
maqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改机构和护理机构为null的报错
parent
b44bd151
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
TokenParsingUtil.java
...src/main/java/com/hungraim/ltc/util/TokenParsingUtil.java
+7
-1
No files found.
common/common-core/src/main/java/com/hungraim/ltc/util/TokenParsingUtil.java
View file @
c80f0408
...
@@ -11,7 +11,13 @@ public class TokenParsingUtil {
...
@@ -11,7 +11,13 @@ public class TokenParsingUtil {
//解析token
//解析token
String
subToken
=
token
.
substring
(
AuthConstants
.
JWT_PREFIX
.
length
());
String
subToken
=
token
.
substring
(
AuthConstants
.
JWT_PREFIX
.
length
());
String
claims
=
JwtHelper
.
decode
(
subToken
).
getClaims
();
String
claims
=
JwtHelper
.
decode
(
subToken
).
getClaims
();
Integer
rid
=
(
Integer
)
JSONObject
.
parseObject
(
claims
).
get
(
id
);
Integer
rid
;
if
(
JSONObject
.
parseObject
(
claims
).
get
(
id
)==
null
||
JSONObject
.
parseObject
(
claims
).
get
(
id
).
equals
(
""
)){
rid
=
0
;
}
else
{
rid
=
(
Integer
)
JSONObject
.
parseObject
(
claims
).
get
(
id
);
}
return
rid
;
return
rid
;
}
}
}
}
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