Commit 3e8e6735 by 王昆

sgb

parent 19da3e78
......@@ -5,7 +5,7 @@ class ApiAppIdCheckCache extends CacheBase {
constructor() {
super();
this.merchantSve = system.getObject("service.merchant.merchantSve");
// this.merchantSve = system.getObject("service.merchant.merchantSve");
}
desc() {
return "应用中来访访问appid缓存";
......@@ -14,11 +14,12 @@ class ApiAppIdCheckCache extends CacheBase {
return settings.cacheprefix + "_verify_appid:";
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
var item = await this.merchantSve.getById(inputkey);
if (!item && item.data) {
return null;
}
return JSON.stringify(item.data);
// var item = await this.merchantSve.getById(inputkey);
// if (!item && item.data) {
// return null;
// }
// return JSON.stringify(item.data);
}
}
module.exports = ApiAppIdCheckCache;
\ No newline at end of file
......@@ -8,7 +8,6 @@ const axios = require('axios');
class ServiceBase {
constructor() {
this.restClient = system.getObject("util.restClient");
this.synlogDao = system.getObject("db.log.synlogDao");
this.micro = system.microsetting();
}
......@@ -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) {
if (!o) {
return "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment