Commit 78b288cb by 宋毅

增加日志

parent efbfaf40
var APIBase = require("../../api.base"); var APIBase = require("../../api.base");
var system = require("../../../system"); var system = require("../../../system");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
class QcAPI extends APIBase { class QcAPI extends APIBase {
constructor() { constructor() {
super(); super();
...@@ -9,12 +10,13 @@ class QcAPI extends APIBase { ...@@ -9,12 +10,13 @@ class QcAPI extends APIBase {
this.ncSve = system.getObject("service.common.ncSve"); this.ncSve = system.getObject("service.common.ncSve");
this.rtSve = system.getObject("service.common.rtSve"); this.rtSve = system.getObject("service.common.rtSve");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
* action_process 执行的流程 * action_process 执行的流程
* action_type 执行的类型 * action_type 执行的类型
* action_body 执行的参数 * action_body 执行的参数
*/ */
async springBoard(pobj, qobj, req) { async springBoard(pobj, qobj, req) {
if (!pobj.actionType) { if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空"); return system.getResult(null, "actionType参数不能为空");
...@@ -22,6 +24,7 @@ class QcAPI extends APIBase { ...@@ -22,6 +24,7 @@ class QcAPI extends APIBase {
var result = await this.opActionProcess(pobj, pobj.actionType, req); var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result; return result;
} }
async opActionProcess(pobj, action_type, req) { async opActionProcess(pobj, action_type, req) {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
...@@ -51,11 +54,14 @@ class QcAPI extends APIBase { ...@@ -51,11 +54,14 @@ class QcAPI extends APIBase {
break; break;
case "serviceProviderNotification"://交付商通知状态变更 case "serviceProviderNotification"://交付商通知状态变更
opResult = await this.baseOrderSve.serviceProviderNotification(pobj); opResult = await this.baseOrderSve.serviceProviderNotification(pobj);
if (pobj && pobj.actionBody && pobj.actionBody.status == 511) {
this.baseOrderSve.serviceProviderSubmitMaterial(pobj);
}
break; break;
case "closeOrderDelivery"://交付商关闭交付单 case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.qcCenterOrderSve.closeOrderDelivery(pobj); opResult = await this.qcCenterOrderSve.closeOrderDelivery(pobj);
break; break;
// 2021-3-23 laolan 易名退款 // 2021-3-23 laolan 易名退款
case "eNameCloseOrder": case "eNameCloseOrder":
opResult = await this.baseOrderSve.eNameCloseOrder(pobj); opResult = await this.baseOrderSve.eNameCloseOrder(pobj);
...@@ -71,7 +77,7 @@ class QcAPI extends APIBase { ...@@ -71,7 +77,7 @@ class QcAPI extends APIBase {
case "ncSubmitSolution"://提交方案(网文)2020-11-11 case "ncSubmitSolution"://提交方案(网文)2020-11-11
opResult = await this.ncSve.ncSubmitSolution(pobj); opResult = await this.ncSve.ncSubmitSolution(pobj);
break; break;
// --------- 广电 --------- // --------- 广电 ---------
...@@ -85,7 +91,7 @@ class QcAPI extends APIBase { ...@@ -85,7 +91,7 @@ class QcAPI extends APIBase {
opResult = await this.rtSve.rtSubmitSolution(pobj); opResult = await this.rtSve.rtSubmitSolution(pobj);
break; break;
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116-------- // --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
case "pushIcpSolution2Channel"://推送ICP方案至渠道(百度) case "pushIcpSolution2Channel"://推送ICP方案至渠道(百度)
opResult = await this.baseOrderSve.pushIcpSolution2Channel(pobj); opResult = await this.baseOrderSve.pushIcpSolution2Channel(pobj);
break; break;
...@@ -97,4 +103,5 @@ class QcAPI extends APIBase { ...@@ -97,4 +103,5 @@ class QcAPI extends APIBase {
} }
} }
module.exports = QcAPI; module.exports = QcAPI;
\ No newline at end of file
...@@ -849,7 +849,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -849,7 +849,7 @@ class BaseCenterOrderService extends AppServiceBase {
reqbody: pushObj reqbody: pushObj
} }
let baidu = await this.baiduclient.baiduReqbyget(baiduParams); 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) { if (baidu && baidu.data && baidu.data.result) {
resFlag = 200 resFlag = 200
} }
......
...@@ -76,33 +76,9 @@ class baiduClient extends AppServiceBase { ...@@ -76,33 +76,9 @@ class baiduClient extends AppServiceBase {
host: this.baiduClientParams.host host: this.baiduClientParams.host
}, // set the http request headers }, // 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); return system.getResultSuccess(res);
} catch (e) { } catch (e) {
await this.disposePushResultFail(obj, e, "badiu->pushBusiness2Baidu->catchError", this.pushlogFailType.FAILLOG); await this.disposePushResultFail(obj, e, "badiu->baiduReqbyget->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
// });
return system.getResultFail(-200, "出现异常,error:" + e.stack); 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