Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
YZG
yzg-util
Commits
37cb42d3
Commit
37cb42d3
authored
May 12, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常处理显示
parent
be954aaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
TokenHelper.java
...l-db/src/main/java/com/yanzuoguang/token/TokenHelper.java
+25
-1
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/token/TokenHelper.java
View file @
37cb42d3
...
...
@@ -93,6 +93,28 @@ public class TokenHelper {
return
StringHelper
.
to
(
cls
,
value
);
}
/**
* 缓存数据
*
* @param token 标记
* @param data 数据时间
*/
public
static
TokenData
write
(
String
token
,
Object
data
)
{
return
write
(
token
,
StringHelper
.
EMPTY
,
0
,
data
);
}
/**
* 缓存数据
*
* @param token 标记
* @param expire 有效期
* @param data 数据时间
*/
public
static
TokenData
write
(
String
token
,
long
expire
,
Object
data
)
{
return
write
(
token
,
StringHelper
.
EMPTY
,
expire
,
data
);
}
/**
* 缓存数据
*
...
...
@@ -110,7 +132,9 @@ public class TokenHelper {
}
tokenData
.
setToken
(
token
);
tokenData
.
setDataPwd
(
dataPwd
);
tokenData
.
setExpire
(
expire
);
if
(
expire
>
0
)
{
tokenData
.
setExpire
(
expire
);
}
if
(
tokenData
.
getData
()
==
null
)
{
tokenData
.
setData
(
new
MapRow
());
}
...
...
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