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,12 +10,13 @@ class QcAPI extends APIBase {
this.ncSve = system.getObject("service.common.ncSve");
this.rtSve = system.getObject("service.common.rtSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
......@@ -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,11 +54,14 @@ 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);
break;
// 2021-3-23 laolan 易名退款
case "eNameCloseOrder":
opResult = await this.baseOrderSve.eNameCloseOrder(pobj);
......@@ -71,7 +77,7 @@ class QcAPI extends APIBase {
case "ncSubmitSolution"://提交方案(网文)2020-11-11
opResult = await this.ncSve.ncSubmitSolution(pobj);
break;
// --------- 广电 ---------
......@@ -85,7 +91,7 @@ class QcAPI extends APIBase {
opResult = await this.rtSve.rtSubmitSolution(pobj);
break;
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
case "pushIcpSolution2Channel"://推送ICP方案至渠道(百度)
opResult = await this.baseOrderSve.pushIcpSolution2Channel(pobj);
break;
......@@ -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