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
640d5b96
Commit
640d5b96
authored
Oct 30, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
6fcf3e25
f516ceb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
center-channel/app/base/service/impl/common/signSve.js
+18
-3
No files found.
center-channel/app/base/service/impl/common/signSve.js
View file @
640d5b96
...
@@ -5,6 +5,7 @@ class SignService{
...
@@ -5,6 +5,7 @@ class SignService{
constructor
()
{
constructor
()
{
this
.
centerAppUrl
=
settings
.
centerAppUrl
();
this
.
centerAppUrl
=
settings
.
centerAppUrl
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
}
async
restPostUrl
(
pobj
,
url
)
{
async
restPostUrl
(
pobj
,
url
)
{
try
{
try
{
...
@@ -20,9 +21,23 @@ class SignService{
...
@@ -20,9 +21,23 @@ class SignService{
}
}
}
}
async
getAppInfoByAppKey
(
appkey
){
async
getAppInfoByAppKey
(
appkey
){
let
url
=
this
.
centerAppUrl
+
'payment/paymentApi/getAppInfoByAppKey'
;
try
{
let
appInfoRt
=
await
this
.
restPostUrl
({
appKey
:
appkey
},
url
);
var
shaStr
=
"getAppInfoByAppKey_"
+
appkey
;
return
appInfoRt
;
var
cacheRes
=
await
this
.
redisClient
.
get
(
shaStr
);
if
(
cacheRes
)
{
return
JSON
.
parse
(
cacheRes
);
}
let
url
=
this
.
centerAppUrl
+
'payment/paymentApi/getAppInfoByAppKey'
;
let
appInfoRt
=
await
this
.
restPostUrl
({
appKey
:
appkey
},
url
);
if
(
appInfoRt
&&
appInfoRt
.
status
==
0
){
//保存缓存
await
this
.
redisClient
.
setWithEx
(
shaStr
,
JSON
.
stringify
(
appInfoRt
),
3600
);
}
return
appInfoRt
;
}
catch
(
error
)
{
var
errres
=
system
.
getResultFail
(
"获取应用信息失败!"
);
return
errres
;
}
}
}
/**
/**
* 验证签名
* 验证签名
...
...
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