Commit 78b288cb by 宋毅

增加日志

parent efbfaf40
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class QcAPI extends APIBase {
constructor() {
super();
......@@ -9,6 +10,7 @@ class QcAPI extends APIBase {
this.ncSve = system.getObject("service.common.ncSve");
this.rtSve = system.getObject("service.common.rtSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
......@@ -22,6 +24,7 @@ class QcAPI extends APIBase {
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
......@@ -51,6 +54,9 @@ class QcAPI extends APIBase {
break;
case "serviceProviderNotification"://交付商通知状态变更
opResult = await this.baseOrderSve.serviceProviderNotification(pobj);
if (pobj && pobj.actionBody && pobj.actionBody.status == 511) {
this.baseOrderSve.serviceProviderSubmitMaterial(pobj);
}
break;
case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.qcCenterOrderSve.closeOrderDelivery(pobj);
......@@ -97,4 +103,5 @@ class QcAPI extends APIBase {
}
}
module.exports = QcAPI;
\ No newline at end of file
......@@ -849,7 +849,7 @@ class BaseCenterOrderService extends AppServiceBase {
reqbody: pushObj
}
let baidu = await this.baiduclient.baiduReqbyget(baiduParams);
this.execClientNew.execLogs("serviceProviderNotification-baiduReqbyget:", baiduParams, "center-channel-serviceProviderNotification", baidu, null);
this.execClientNew.execLogs("serviceProviderNotification-update-baiduReqbyget:", baiduParams, "center-channel-serviceProviderNotification", baidu, null);
if (baidu && baidu.data && baidu.data.result) {
resFlag = 200
}
......
......@@ -76,33 +76,9 @@ class baiduClient extends AppServiceBase {
host: this.baiduClientParams.host
}, // set the http request headers
});
if (res.status == 0) {
await this.disposePushResult(obj, res, "baidu->pushBusiness2Baidu->result", "");
} else {
await this.disposePushResultFail(obj, res, "badiu->pushBusiness2Baidu->catchError", this.pushlogFailType.FAILLOG);
}
// this.pushlogSve.createDb({
// op: "new-baiduReqbyget",
// content: JSON.stringify(obj),//推送的参数信息
// resultInfo: JSON.stringify(res),
// returnType: '1',
// logLevel: '1',
// opTitle: "new-baiduReqbyget推送百度信息返回成功"
// });
return system.getResultSuccess(res);
} catch (e) {
await this.disposePushResultFail(obj, e, "badiu->pushBusiness2Baidu->catchError", this.pushlogFailType.FAILLOG);
// this.pushlogSve.createFailLogDb({
// appid: obj.appInfo ? obj.appInfo.uapp_id || "" : "",
// appkey: obj.appInfo ? obj.appInfo.uapp_key || "" : "",
// requestId: obj.requestId || "",
// content: JSON.stringify(obj),//推送的参数信息
// resultInfo: "error:" + JSON.stringify(e),
// clientIp: obj.clientIp || "",
// failType: 1,
// opTitle: "new-baiduReqbyget推送百度信息返回异常",
// pushNumber: obj.pushNumber || 1
// });
await this.disposePushResultFail(obj, e, "badiu->baiduReqbyget->catchError", this.pushlogFailType.FAILLOG);
return system.getResultFail(-200, "出现异常,error:" + e.stack);
}
}
......
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