Commit c66260a3 by 蒋勇

d

parent 88e24c2b
...@@ -94,10 +94,10 @@ class CtlBase { ...@@ -94,10 +94,10 @@ class CtlBase {
return system.getResultFail(...xarg); return system.getResultFail(...xarg);
} }
var rtn = await this[methodname](pobj, query, req); var rtn = await this[methodname](pobj, query, req);
this.logClient.log(pobj,req,rtn) this.logClient.log(pobj,req,rtn,null,"center-manger")
return rtn; return rtn;
} catch (e) { } catch (e) {
this.logClient.log(pobj,req,{}) this.logClient.log(pobj,req,null,e.stack,"center-manger")
console.log(e.stack, "出现异常,请联系管理员......."); console.log(e.stack, "出现异常,请联系管理员.......");
return system.getResultFail(-200, "出现异常,请联系管理员"); return system.getResultFail(-200, "出现异常,请联系管理员");
} }
......
...@@ -13,11 +13,11 @@ class LogClient { ...@@ -13,11 +13,11 @@ class LogClient {
var u = uuid.replace(/\-/g, ""); var u = uuid.replace(/\-/g, "");
return u; return u;
} }
async log(pobj, req, rtn) { async log(pobj, req, rtnok,errinfo,appname) {
rtn.requestId = this.getUUID() rtn.requestId = this.getUUID()
req.params.param = pobj req.params.param = pobj
//第三个字段应该存公司id //第三个字段应该存公司id
system.execLogs(req.xctx.codetitle, req.params, pobj.company_id, rtn, null).then(res => { system.execLogs(appname+"_"+req.xctx.codetitle, req.params, pobj.company_id, rtnok, errinfo).then(res => {
if (res && res.status == 1) { if (res && res.status == 1) {
console.log("log.....success") console.log("log.....success")
} else { } else {
......
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