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
3e8e6735
Commit
3e8e6735
authored
Mar 31, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sgb
parent
19da3e78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
29 deletions
+8
-29
xgg-saas-merchant/app/base/db/cache/apiAppIdCheckCache.js
+8
-6
xgg-saas-merchant/app/base/service/svems.base.js
+0
-23
No files found.
xgg-saas-merchant/app/base/db/cache/apiAppIdCheckCache.js
View file @
3e8e6735
...
@@ -5,7 +5,7 @@ class ApiAppIdCheckCache extends CacheBase {
...
@@ -5,7 +5,7 @@ class ApiAppIdCheckCache extends CacheBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
merchantSve
=
system
.
getObject
(
"service.merchant.merchantSve"
);
//
this.merchantSve = system.getObject("service.merchant.merchantSve");
}
}
desc
()
{
desc
()
{
return
"应用中来访访问appid缓存"
;
return
"应用中来访访问appid缓存"
;
...
@@ -14,11 +14,12 @@ class ApiAppIdCheckCache extends CacheBase {
...
@@ -14,11 +14,12 @@ class ApiAppIdCheckCache extends CacheBase {
return
settings
.
cacheprefix
+
"_verify_appid:"
;
return
settings
.
cacheprefix
+
"_verify_appid:"
;
}
}
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
var
item
=
await
this
.
merchantSve
.
getById
(
inputkey
);
// var item = await this.merchantSve.getById(inputkey);
if
(
!
item
&&
item
.
data
)
{
// if (!item && item.data) {
return
null
;
// return null;
}
// }
return
JSON
.
stringify
(
item
.
data
);
// return JSON.stringify(item.data);
}
}
}
}
module
.
exports
=
ApiAppIdCheckCache
;
module
.
exports
=
ApiAppIdCheckCache
;
\ No newline at end of file
xgg-saas-merchant/app/base/service/svems.base.js
View file @
3e8e6735
...
@@ -8,7 +8,6 @@ const axios = require('axios');
...
@@ -8,7 +8,6 @@ const axios = require('axios');
class
ServiceBase
{
class
ServiceBase
{
constructor
()
{
constructor
()
{
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
synlogDao
=
system
.
getObject
(
"db.log.synlogDao"
);
this
.
micro
=
system
.
microsetting
();
this
.
micro
=
system
.
microsetting
();
}
}
...
@@ -252,28 +251,6 @@ class ServiceBase {
...
@@ -252,28 +251,6 @@ class ServiceBase {
}
}
}
}
async
callApi
(
url
,
data
,
name
)
{
let
log
=
await
this
.
synlogDao
.
create
({
apiUrl
:
url
,
apiName
:
name
,
apiReq
:
JSON
.
stringify
(
data
),
apiRes
:
""
,
});
let
res
=
await
axios
({
method
:
'post'
,
url
:
url
,
data
:
data
});
console
.
log
(
res
);
console
.
log
(
res
.
data
);
log
.
apiRes
=
JSON
.
stringify
(
res
.
data
);
log
.
save
();
return
res
.
data
;
}
trim
(
o
)
{
trim
(
o
)
{
if
(
!
o
)
{
if
(
!
o
)
{
return
""
;
return
""
;
...
...
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