Commit b9aa14d3 by 宋毅

tj

parent 601a36fd
...@@ -142,17 +142,19 @@ class APIBase { ...@@ -142,17 +142,19 @@ class APIBase {
if (rtn && !rtn.requestId) { if (rtn && !rtn.requestId) {
rtn.requestId = requestid; rtn.requestId = requestid;
} }
this.logCtl.createDb({ if (methodname != "test") {
appid: req.app.id, this.logCtl.createDb({
appkey: req.app.uappKey, appid: req.app.id,
requestId: requestid, appkey: req.app.uappKey,
op: req.classname + "/" + methodname, requestId: requestid,
content: JSON.stringify(pobj), op: req.classname + "/" + methodname,
resultInfo: JSON.stringify(rtn), content: JSON.stringify(pobj),
clientIp: req.clientIp, resultInfo: JSON.stringify(rtn),
agent: req.uagent, clientIp: req.clientIp,
opTitle: "api服务提供方appKey:" + settings.appKey, agent: req.uagent,
}); opTitle: "api服务提供方appKey:" + settings.appKey,
});
}
return rtn; return rtn;
} catch (e) { } catch (e) {
console.log(e.stack, "api调用出现异常,请联系管理员..........") console.log(e.stack, "api调用出现异常,请联系管理员..........")
......
...@@ -4,17 +4,8 @@ class jdAuthAPI extends APIBase { ...@@ -4,17 +4,8 @@ class jdAuthAPI extends APIBase {
constructor() { constructor() {
super(); super();
} }
async test(pobj, qobj, req) {
async getUser(pobj, qobj, req) { return system.getResultSuccess();
console.log("pobj......getUser..........:\n", pobj);
console.log("qobj......getUser..........:\n", qobj);
return { getUser: "ok" };
}
async payOrderInfo(pobj, qobj, req) {
console.log("pobj......payOrderInfo..........:\n", pobj);
console.log("qobj......payOrderInfo..........:\n", qobj);
return { payOrderInfo: "ok" };
} }
} }
module.exports = jdAuthAPI; module.exports = jdAuthAPI;
\ No newline at end of file
...@@ -199,11 +199,11 @@ class System { ...@@ -199,11 +199,11 @@ class System {
} }
var objabspath = classpath + "/" + filename + ".js"; var objabspath = classpath + "/" + filename + ".js";
if (System.objTable[objabspath] != null) { if (System.objTable[objabspath] != null) {
console.log(objabspath, "get cached obj...."); // console.log(objabspath, "get cached obj....");
return System.objTable[objabspath]; return System.objTable[objabspath];
} else { } else {
console.log("no cached..."); // console.log("no cached...");
var ClassObj = require(objabspath); var ClassObj = require(objabspath);
return System.register(objabspath, ClassObj); return System.register(objabspath, ClassObj);
} }
......
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