Commit 3e8e6735 by 王昆

sgb

parent 19da3e78
...@@ -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
...@@ -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 "";
......
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