Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
10ce8a27
Commit
10ce8a27
authored
Jul 23, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update getLoginByUserName
parent
3ae4fe68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
center-app/app/base/utils/businessManager/opPlatformUtils.js
+7
-0
center-app/app/base/utils/redisClient.js
+4
-0
No files found.
center-app/app/base/utils/businessManager/opPlatformUtils.js
View file @
10ce8a27
...
...
@@ -305,6 +305,11 @@ class OpPlatformUtils {
var
result
=
await
cacheManager
[
"AppUserPinByUserNameCache"
].
getCache
(
inputkey
);
if
(
result
&&
result
.
status
==
0
)
{
if
(
result
.
data
.
userpin
)
{
// 2020 0723 lin修改 登录并重新设置过期时间
var
inputkey
=
this
.
getUserPinKey
(
inputkey
);
var
userpinKey
=
this
.
getUserPinKey
(
result
.
data
.
userpin
);
await
this
.
redisClient
.
setExpire
(
inputkey
,
system
.
exTime
);
await
this
.
redisClient
.
setExpire
(
userpinKey
,
system
.
exTime
);
return
system
.
getResultFail
(
system
.
reDoLoginFail
,
"请勿重复处理"
,
{
userpin
:
result
.
data
.
userpin
||
""
});
}
else
{
await
this
.
clearLoginCache
(
inputkey
);
...
...
@@ -387,6 +392,8 @@ class OpPlatformUtils {
if
(
!
userInfoResult
)
{
return
system
.
getResultFail
(
system
.
noLogin
,
"user no login"
);
}
// 2020 0723 lin修改 获取账户信息并重新设置过期时间
// await this.redisClient.setExpire(userpinKey, system.exTime);
return
JSON
.
parse
(
userInfoResult
);
}
/**
...
...
center-app/app/base/utils/redisClient.js
View file @
10ce8a27
...
...
@@ -248,6 +248,10 @@ class RedisClient {
console
.
log
(
"publish--"
+
channel
+
":"
+
consumetarget
);
return
this
.
client
.
publishAsync
(
channel
,
consumetarget
);
}
// 2020 0723 lin 新增 设置过期时间方法
async
setExpire
(
key
,
t
)
{
this
.
client
.
expire
(
key
,
t
);
}
}
module
.
exports
=
RedisClient
;
// var client=new RedisClient();
...
...
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