Commit d66e662f by 任晓松

Merge remote-tracking branch 'origin/center-channel' into center-channel

parents 86420745 47f7ef9d
......@@ -605,8 +605,7 @@ class CenterorderService extends AppServiceBase {
var fqobj = {
actionBody: {
area: pobj.actionBody.province,
city: pobj.actionBody.province,
regType: pobj.actionBody.regType,
idempotentSource: pobj.actionBody.regType,
orderNo: pobj.actionBody.channelOrder.channelOrderNo,
orderPrice: Number(pobj.actionBody.orderPrice / 100),
phone: pobj.actionBody.publishMobile,
......@@ -629,8 +628,8 @@ class CenterorderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Fq(fqobj, "pushOrderICPBusiness");
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.baiduBusiness2Fq(fqobj, "pushOrderICPBusinessNew");
this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
return system.getResultSuccess();
}
}
......
......@@ -1380,19 +1380,22 @@ class UtilsNeedService extends AppServiceBase {
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
if (pobj.actionBody.channel_type_code == "esp.companyreg") {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness");
// this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness");
} else {
var reqParams = {
actionBody: pobj.actionBody,
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "addChance");
// this.utilsPushSve.baiduBusiness2Delivery(reqParams, "addChance");
pobj.actionBody.description = pobj.actionBody.description + " 成交概率:" + pobj.actionBody.level
if (pobj.actionBody.probability) {
pobj.actionBody.description = pobj.actionBody.description + "(" + pobj.actionBody.probability + ") "
}
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedICPBusiness");
pobj.actionBody.idempotentId = pobj.actionBody.intentionBizId;
pobj.actionBody.idempotentSource = pobj.actionBody.type;
pobj.actionBody.customerName = pobj.actionBody.userName;
this.utilsPushSve.baiduBusiness2Fq(pobj, "pushNeedICPBusinessNew");
}
}
return result;
......@@ -1428,7 +1431,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.status != 1 && actionBody.status != 2 && rtn.data) {
var tmpObj = {
......@@ -1439,7 +1442,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.baiduBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -1447,7 +1450,7 @@ class UtilsNeedService extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.baiduBusiness2Fq(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......
......@@ -125,5 +125,49 @@ class UtilsPushService extends AppServiceBase {
return await this.disposePushResultFail(pobj, errorResult, "数据推送异常-->reflexAction-->errorResult", this.pushlogFailType.FAILLOG);
}
}
//---------百度---zhuangbing--2020.10.28------start--------------------------------------------
async baiduBusiness2Fq(pobj, opType) {//供业务调用,在代码中调用,不在db中做配置进行调用
pobj.actionType = "getAppInterface";
var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
pobj.interface_info = productItemInterfaceResult.data;
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/utilsSve/utilsPushSve.js/service/app.base.js/baiduBusiness2Fq",
content: JSON.stringify(pobj),
resultInfo: productItemInterfaceResult.data ? JSON.stringify(productItemInterfaceResult.data) : "接口数据为空",
optitle: pobj.opType + "推送蜂擎获取的接口信息->baiduBusiness2Fq",
});
if (pobj.interface_info) {
await this.pushBusInfo(pobj, opType, 1);
return system.getResultSuccess();
}
return system.getResult(null, "push Fail,interface_info data is empty");
}
async baiduBusiness2Delivery(pobj, opType) {//供业务调用,在代码中调用,不在db中做配置进行调用
pobj.actionType = "getAppInterface";
var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
pobj.interface_info = productItemInterfaceResult.data;
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/utilsSve/utilsPushSve.js/service/app.base.js/baiduBusiness2Delivery",
content: JSON.stringify(pobj),
resultInfo: productItemInterfaceResult.data ? JSON.stringify(productItemInterfaceResult.data) : "接口数据为空",
optitle: opType + "推送蜂擎获取的接口信息->baiduBusiness2Delivery",
});
if (pobj.interface_info) {
await this.pushBusInfo(pobj, opType, 1);
return system.getResultSuccess();
}
return system.getResult(null, "push Fail,interface_info data is empty");
}
//---------百度---zhuangbing--2020.10.28------end--------------------------------------------
}
module.exports = UtilsPushService;
......@@ -16,8 +16,8 @@ module.exports = {
"submitIcpIntention", "queryIntentionList", "confirmIcpIntention", "tmAccept", "tmStatus", "needBatchUpload",
"serviceSubmitOption", "submitWangwenSolution", "closeNeed", "recordLog", "recordLogList", "foodServiceSubmitOption", "submitFoodSolution",
"foodCloseNeed", "foodRecordLog", "foodRecordLogList", "getParamsFor360", "addOrderWeb", "getPayRecords", "getLoginInfo","putUserMobileByVcode",
"putUserPwdByMobile"
"putUserPwdByMobile","icpNotifyNew"
],
apiMustUserpinList: ["submitNeed", "paySuccess", "icpNotify", "getLoginInfo"]
apiMustUserpinList: ["submitNeed", "paySuccess", "icpNotify", "getLoginInfo","icpNotifyNew"]
}
}
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