Commit 1feee055 by 宋毅

优化公共调用

parent 3d4e0959
......@@ -28,7 +28,7 @@ class AccessAuthAPI extends APIBase {
return rtn;
}
async taskAgainFqPushInfo(pobj, qobj, req) {//再次推送蜂擎业务数据
var rtn = await this.utilsPushSve.aliBusiness2Fq(pobj, pobj.opType);
var rtn = await this.utilsPushSve.business2Channel(pobj, pobj.opType);
this.pushlogSve.delDbPushfaillogById(Number(pobj.id || 0));
return rtn;
}
......
......@@ -193,7 +193,7 @@ class BaseCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
await this.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
await this.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
}
return res;
}
......
......@@ -198,7 +198,7 @@ class CenterorderService extends AppServiceBase {
pobj.actionBody.appName = pobj.appInfo.app_name;
if (solutiondata.status == 0) {
pobj.actionBody.orderNo = pobj.actionBody.channelOrder.channelOrderNo;
this.utilsPushSve.aliBusiness2Fq(pobj, "pushOrderBusiness");
this.utilsPushSve.business2Channel(pobj, "pushOrderBusiness");
}
return system.getResultSuccess();
}
......@@ -337,7 +337,7 @@ class CenterorderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
let aliPushRes = await this.utilsPushSve.aliBusiness2Fq(fqobj, "pushOrderICPBusiness");
let aliPushRes = await this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusiness");
if(pobj.actionBody.isDirectBuy && pobj.actionBody.isDirectBuy=="true"){//直接下单需执行添加订单业务员操作
if(aliPushRes && aliPushRes.status==0){
if(aliPushRes.data && aliPushRes.data.data){
......@@ -357,14 +357,14 @@ class CenterorderService extends AppServiceBase {
var salesmanRes = JSON.parse(addRes.stdout);
if (salesmanRes.status == 0) {
deliveryObj.actionBody.needsolution = salesmanRes.data;
await this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
await this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
}
}
}
}else {
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
return system.getResultSuccess();
}
......@@ -675,7 +675,7 @@ class CenterorderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
var baiduPushRes = await this.utilsPushSve.baiduBusiness2Fq(fqobj, "pushOrderICPBusinessNew");
var baiduPushRes = await this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusinessNew");
var deliveryObj = {
actionBody: {
orderNo: orderrtn.data.orderNo,//pobj.actionBody.channelOrder.channelOrderNo,
......@@ -709,14 +709,14 @@ class CenterorderService extends AppServiceBase {
var salesmanRes = JSON.parse(addRes.stdout);
if (salesmanRes.status == 0) {
deliveryObj.actionBody.needsolution = salesmanRes.data;
await this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
await this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
}
}
}
}else{
this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
return system.getResultSuccess();
}
......
......@@ -123,7 +123,7 @@ class NcService extends AppServiceBase {
appInfo: pobj.appInfo
}
var self = this;
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
self.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -225,7 +225,7 @@ class NcService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
this.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -246,7 +246,7 @@ class NcService extends AppServiceBase {
var a = await this.baiduclient.baiduReqbyget({ path: "/api/bla/provider/requirement/update", reqbody: pushObj});
console.log('nc closeNeed+++',a)
}
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
this.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result;
}
......
......@@ -74,7 +74,7 @@ class QcCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
this.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//
return system.getResultSuccess(pushIcpSolutionRes);
}
......
......@@ -126,7 +126,7 @@ class RegCenterOrderService extends AppServiceBase {
appInfo: pobj.appInfo
}
console.log('fqobj----',fqobj)
var baiduPushRes = await this.utilsPushSve.baiduBusiness2Fq(fqobj, "pushOrderICPBusinessNew");
var baiduPushRes = await this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusinessNew");
var deliveryObj = {
actionBody: {
orderNo: orderrtn.data.orderNo,//pobj.actionBody.channelOrder.channelOrderNo,
......@@ -160,14 +160,14 @@ class RegCenterOrderService extends AppServiceBase {
var salesmanRes = JSON.parse(addRes.stdout);
if (salesmanRes.status == 0) {
deliveryObj.actionBody.needsolution = salesmanRes.data;
await this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
await this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
}
}
}
}else{
this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
return system.getResultSuccess();
}
......@@ -265,7 +265,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj.actionBody.idempotentId = pobj.actionBody.intentionBizId;
// pobj.actionBody.idempotentSource = pobj.actionBody.type;
pobj.actionBody.customerName = pobj.actionBody.userName;
this.utilsPushSve.baiduBusiness2Fq(pobj, "pushNeedICPBusinessNew");
this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusinessNew");
}
return result;
}
......@@ -286,7 +286,7 @@ class RegCenterOrderService extends AppServiceBase {
if (pobj.intentionStatus) {
// 如果需求当前字段为5(已关闭)则通知fq
if (pobj.intentionStatus == 5) {
self.utilsPushSve.baiduBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
}
var data = JSON.parse(rtn.stdout);
......@@ -324,7 +324,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.status != 1 && actionBody.status != 2 && rtn.data) {
var tmpObj = {
......@@ -335,7 +335,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -343,7 +343,7 @@ class RegCenterOrderService extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.baiduBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......@@ -372,7 +372,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
// tmpObj.actionBody.orderNo = channelOrderNo;
var tmpObj2 = {
actionBody: {
......@@ -382,7 +382,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
};
self.utilsPushSve.baiduBusiness2Fq(tmpObj2, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj2, "pushOrderICPClose");
}//通知更新状态
return rtn;
}
......@@ -474,7 +474,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
await this.utilsPushSve.baiduBusiness2Delivery(reqParams, "updateChanceStatus");
await this.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
}
return res;
}
......@@ -532,7 +532,7 @@ class RegCenterOrderService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(reqParams, "updateChanceStatus");
this.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -561,7 +561,7 @@ class RegCenterOrderService extends AppServiceBase {
resultInfo: "",
optitle: "推送baidu-reg关闭需求->closeNeed",
});
this.utilsPushSve.baiduBusiness2Fq(pobj, "pushCloseICPNeed");
this.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result;
......@@ -638,7 +638,7 @@ class RegCenterOrderService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.baiduBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
var fqobj = {
actionBody: {
"bizId": pobj.actionBody.intentionBizId,
......@@ -648,7 +648,7 @@ class RegCenterOrderService extends AppServiceBase {
opType: "aliFollowup",
appInfo: pobj.appInfo
}
self.utilsPushSve.baiduBusiness2Fq(fqobj, "aliFollowup");
self.utilsPushSve.business2Channel(fqobj, "aliFollowup");
return result
}
......
......@@ -126,7 +126,7 @@ class RtService extends AppServiceBase {
appInfo: pobj.appInfo
}
var self = this;
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
self.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -228,7 +228,7 @@ class RtService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
this.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -249,7 +249,7 @@ class RtService extends AppServiceBase {
var a = await this.baiduclient.baiduReqbyget({ path: "/api/bla/provider/requirement/update", reqbody: pushObj});
console.log('rt closeNeed+++',a)
}
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
this.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result;
}
......
......@@ -21,7 +21,7 @@ class utilsDeliverSve extends AppServiceBase{
return system.getResultFail();
}
pobj.actionBody = verifyResult.data;
this.utilsPushSve.aliBusiness2Delivery(pobj, "pushTmReDeliver");
this.utilsPushSve.business2Channel(pobj, "pushTmReDeliver");
return system.getResultSuccess();
}catch (e) {
return system.getResultFail();
......@@ -123,7 +123,7 @@ class utilsDeliverSve extends AppServiceBase{
if(orderResult.data && orderResult.data.orderStatus === 2){
// 推送交付中心
pobj.actionBody = verifyResult.data;
this.utilsPushSve.aliBusiness2Delivery(pobj, "pushTmReDeliver");
this.utilsPushSve.business2Channel(pobj, "pushTmReDeliver");
}
return result;
}catch (e) {
......
......@@ -45,7 +45,7 @@ class UtilsFgbusinesschancService extends AppServiceBase {
}
var tmpResult = await self.restPostUrl(tmpPobj, reqUrl);
if (tmpResult.status == 0) {
self.utilsPushSve.aliBusiness2Fq(tmpPobj, "pushRePurchaseBusiness");
self.utilsPushSve.business2Channel(tmpPobj, "pushRePurchaseBusiness");
}
}
}
......
......@@ -81,7 +81,7 @@ class UtilsFqAliyunService extends AppServiceBase {
}
var interface_params_info = verifyResult.data;
if (interface_params_info.opUrl.indexOf("/cts-open-agency/crm/opportunity/submit") >= 0) {
await this.transformNeedActionBody(pobj);
}
var result = await this.opAliyunClientPost(pobj, interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, pobj.actionBody);
return await this.disposePushResult(pobj, result, "fq->pushAliBusiness2Fq->result", this.pushlogFailType.FQ);
......
......@@ -103,22 +103,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.business2Channel(pobj, "pushNeedBusiness");
} else {
if (["ali.tm","ali.tmd"].includes(pobj.actionBody.type)){
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedTMBusiness");
this.utilsPushSve.business2Channel(pobj, "pushNeedTMBusiness");
}else {
var reqParams = {
actionBody: pobj.actionBody,
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "addChance");
this.utilsPushSve.business2Channel(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");
this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusiness");
}
}
}
......@@ -201,7 +201,7 @@ class UtilsNeedService extends AppServiceBase {
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
this.utilsPushSve.business2Fq(pobj, "pushNeedTMBusiness");
this.utilsPushSve.business2Channel(pobj, "pushNeedTMBusiness");
}
return result;
}
......@@ -228,13 +228,13 @@ class UtilsNeedService extends AppServiceBase {
"sign": await this.getFQbossSign(pobj.actionBody),
actionBody: pobj.actionBody
}, settings.fqbossTmUrl())
self.utilsPushSve.aliBusiness2Fq(pobj, "pushTMFeedback");
self.utilsPushSve.business2Channel(pobj, "pushTMFeedback");
}else
// 2020 0803 lin 修改;
if (pobj.intentionStatus) {
// 如果需求当前字段为5(已关闭)则通知fq
if (pobj.intentionStatus == 5) {
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
}
return data;
......@@ -258,7 +258,7 @@ class UtilsNeedService extends AppServiceBase {
"sign": await this.getFQbossSign(pobj.actionBody),
actionBody: pobj.actionBody
}, settings.fqbossTmUrl())
self.utilsPushSve.business2Fq(pobj, "pushTMFeedback");
self.utilsPushSve.business2Channel(pobj, "pushTMFeedback");
}
return data;
}
......@@ -310,7 +310,7 @@ 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.business2Channel(pobj, "pushNeedBusiness");
}
// else{
// if(pobj.actionBody.channel_type_code==5){
......@@ -430,8 +430,8 @@ class UtilsNeedService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result;
}
......@@ -480,7 +480,7 @@ class UtilsNeedService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
self.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -494,7 +494,7 @@ class UtilsNeedService extends AppServiceBase {
// 推送ali
var a = await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo, Note: actionBody.note }, apiVersion: "2019-05-08" });
console.log(a);
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result
}
......@@ -596,7 +596,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.status != 1 && actionBody.status != 2 && rtn.data) {
var tmpObj = {
......@@ -607,7 +607,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -615,7 +615,7 @@ class UtilsNeedService extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
}
......@@ -716,7 +716,7 @@ class UtilsNeedService extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
var fqobj = {
actionBody: {
"bizId": pobj.actionBody.intentionBizId,
......@@ -726,7 +726,7 @@ class UtilsNeedService extends AppServiceBase {
opType: "aliFollowup",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Fq(fqobj, "aliFollowup");
self.utilsPushSve.business2Channel(fqobj, "aliFollowup");
return system.getResultSuccess();
}
......@@ -816,7 +816,7 @@ class UtilsNeedService extends AppServiceBase {
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseNeed");
this.utilsPushSve.business2Channel(pobj, "pushCloseNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "推送失敗 100388");
......@@ -985,7 +985,7 @@ class UtilsNeedService extends AppServiceBase {
async testsymq(pobj) {
var a = null;
try {
a = await this.utilsPushSve.aliBusiness2Delivery(pobj.actionBody, pobj.actionBody.pushtype);
a = await this.utilsPushSve.business2Channel(pobj.actionBody, pobj.actionBody.pushtype);
return system.getResultSuccess(a);
} catch (error) {
return system.getResultSuccess(error);
......@@ -1397,8 +1397,8 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Fq(fqobj, "pushOrderICPBusiness");
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusiness");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
break;
case "USER_CONFIRM_PRODUCE":
break;
......@@ -1470,7 +1470,7 @@ class UtilsNeedService extends AppServiceBase {
appInfo: pobj.appInfo
}
console.log(deliveryObj)
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.operationType != "USER_PAY_PRODUCE" && actionBody.operationType != "USER_UPLOAD_PRODUCE" && rtn.data) {
console.log("pushDeliveryStatusNotify start ------")
......@@ -1483,7 +1483,7 @@ class UtilsNeedService extends AppServiceBase {
appInfo: pobj.appInfo
}
console.log(tmpObj)
var res = await this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
var res = await this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
console.log("res")
console.log(res);
console.log("pushDeliveryStatusNotify end ------")
......@@ -1494,7 +1494,7 @@ class UtilsNeedService extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......@@ -1617,7 +1617,7 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.idempotentId = pobj.actionBody.intentionBizId;
// pobj.actionBody.idempotentSource = pobj.actionBody.type;
pobj.actionBody.customerName = pobj.actionBody.userName;
this.utilsPushSve.baiduBusiness2Fq(pobj, "pushNeedICPBusinessNew");
this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusinessNew");
}
}
return result;
......@@ -1653,7 +1653,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.status != 1 && actionBody.status != 2 && rtn.data) {
var tmpObj = {
......@@ -1664,7 +1664,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -1672,7 +1672,7 @@ class UtilsNeedService extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.baiduBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......@@ -1699,7 +1699,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.baiduBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
// tmpObj.actionBody.orderNo = channelOrderNo;
var tmpObj2 = {
actionBody: {
......@@ -1709,7 +1709,7 @@ class UtilsNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
};
self.utilsPushSve.baiduBusiness2Fq(tmpObj2, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj2, "pushOrderICPClose");
}//通知更新状态
return rtn;
}
......
......@@ -93,19 +93,19 @@ class UtilsNeedService2 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.business2Channel(pobj, "pushNeedBusiness");
} else {
var reqParams = {
actionBody: pobj.actionBody,
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "addChance");
this.utilsPushSve.business2Channel(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");
this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusiness");
}
}
return result;
......@@ -124,7 +124,7 @@ class UtilsNeedService2 extends AppServiceBase {
if (pobj.intentionStatus) {
// 如果需求当前字段为5(已关闭)则通知fq
if (pobj.intentionStatus == 5) {
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
}
var rtn = await this.execClient.execPost(pobj, url);
......@@ -163,7 +163,7 @@ class UtilsNeedService2 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.business2Channel(pobj, "pushNeedBusiness");
}
// else{
// if(pobj.actionBody.channel_type_code==5){
......@@ -255,8 +255,8 @@ class UtilsNeedService2 extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result
}
......@@ -309,7 +309,7 @@ class UtilsNeedService2 extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
//日志记录
self.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......@@ -329,7 +329,7 @@ class UtilsNeedService2 extends AppServiceBase {
var a = await self.baiduclient.baiduReqbyget({ path: "/api/bla/provider/requirement/update", reqbody: { requirementId: actionBody.channelNeedNo, status: "CLOSED", note: actionBody.note } });
}
console.log("closed need a+++", a);
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
self.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
}
return result;
}
......@@ -405,7 +405,7 @@ class UtilsNeedService2 extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.status != 1 && actionBody.status != 2 && rtn.data) {
var tmpObj = {
......@@ -416,7 +416,7 @@ class UtilsNeedService2 extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -424,7 +424,7 @@ class UtilsNeedService2 extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......@@ -539,7 +539,7 @@ class UtilsNeedService2 extends AppServiceBase {
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.business2Channel(reqParams, "updateChanceStatus");
var fqobj = {
actionBody: {
"bizId": pobj.actionBody.intentionBizId,
......@@ -549,7 +549,7 @@ class UtilsNeedService2 extends AppServiceBase {
opType: "aliFollowup",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Fq(fqobj, "aliFollowup");
self.utilsPushSve.business2Channel(fqobj, "aliFollowup");
return system.getResultSuccess();
}
......@@ -670,7 +670,7 @@ class UtilsNeedService2 extends AppServiceBase {
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseNeed");
this.utilsPushSve.business2Channel(pobj, "pushCloseNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "推送失敗 100388");
......@@ -840,7 +840,7 @@ class UtilsNeedService2 extends AppServiceBase {
async testsymq(pobj) {
var a = null;
try {
a = await this.utilsPushSve.aliBusiness2Delivery(pobj.actionBody, pobj.actionBody.pushtype);
a = await this.utilsPushSve.business2Channel(pobj.actionBody, pobj.actionBody.pushtype);
return system.getResultSuccess(a);
} catch (error) {
return system.getResultSuccess(error);
......@@ -1270,8 +1270,8 @@ class UtilsNeedService2 extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Fq(fqobj, "pushOrderICPBusiness");
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusiness");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
break;
case "USER_CONFIRM_PRODUCE":
break;
......@@ -1342,7 +1342,7 @@ class UtilsNeedService2 extends AppServiceBase {
appInfo: pobj.appInfo
}
console.log(deliveryObj)
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.operationType != "USER_PAY_PRODUCE" && actionBody.operationType != "USER_UPLOAD_PRODUCE" && rtn.data) {
console.log("pushDeliveryStatusNotify start ------")
......@@ -1355,10 +1355,8 @@ class UtilsNeedService2 extends AppServiceBase {
appInfo: pobj.appInfo
}
console.log(tmpObj)
var res = await this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
console.log("res")
console.log(res);
console.log("pushDeliveryStatusNotify end ------")
var res = await this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
console.log(res,"res-------pushDeliveryStatusNotify end ------")
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.operationType == "ABC_CLOSE_PRODUCE") {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -1366,7 +1364,7 @@ class UtilsNeedService2 extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......@@ -1450,19 +1448,19 @@ class UtilsNeedService2 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.business2Channel(pobj, "pushNeedBusiness");
} else {
var reqParams = {
actionBody: pobj.actionBody,
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "addChance");
this.utilsPushSve.business2Channel(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");
this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusiness");
}
}
return result;
......@@ -1498,7 +1496,7 @@ class UtilsNeedService2 extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
if (rtn.status == 0 && actionBody.status != 1 && actionBody.status != 2 && rtn.data) {
var tmpObj = {
......@@ -1509,7 +1507,7 @@ class UtilsNeedService2 extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
......@@ -1517,7 +1515,7 @@ class UtilsNeedService2 extends AppServiceBase {
return system.getResultFail(-5022, "订单关闭失败");
}
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......
......@@ -46,7 +46,7 @@ class UtilsOpNeedService extends AppServiceBase {
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
if (pobj.actionBody.channel_type_code == "esp.companyreg" || pobj.actionBody.channel_type_code == "esp.companyreg_cloud") {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness");
this.utilsPushSve.business2Channel(pobj, "pushNeedBusiness");
}
}
return result;
......@@ -168,7 +168,7 @@ class UtilsOpNeedService extends AppServiceBase {
},
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
this.utilsPushSve.business2Channel(tmpObj, "pushDeliveryStatusNotify");
tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) {
......@@ -176,7 +176,7 @@ class UtilsOpNeedService extends AppServiceBase {
if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败");
}
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
self.utilsPushSve.business2Channel(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
return rtn;
......
......@@ -77,7 +77,7 @@ class UtilsOrderService extends AppServiceBase {
fqobj.actionBody.price_desc = opResult.data.product_info.price_item.price_desc;
}
this.execClientNew.execLogs("pushNewFq-3", fqobj, "center-channel-utilsOrderSve-pushNewFqByChannelOrderNo-pushBusInfo", "pushOrder", null);
this.utilsPushSve.aliBusiness2Fq(fqobj, "pushOrderBusiness");
this.utilsPushSve.business2Channel(fqobj, "pushOrderBusiness");
}
}
......@@ -902,7 +902,7 @@ class UtilsOrderService extends AppServiceBase {
pobj.actionType = "updateStausByRefundOrder";
var url = settings.centerOrderUrl() + "action/icapi/springBoard";
await this.execClient.execPost(pobj, url);
this.utilsPushSve.aliBusiness2Fq(pobj, "pushRefundIC");
this.utilsPushSve.business2Channel(pobj, "pushRefundIC");
return system.getResultSuccess();
} catch (e) {
return system.getResultFail(-200, e.stack);
......@@ -1245,7 +1245,7 @@ class UtilsOrderService extends AppServiceBase {
throw new Error('推送失败')
}
pobj.actionBody = pushRet.data;
this.utilsPushSve.aliBusiness2Delivery(pobj, "pushDeliveryOrder");
this.utilsPushSve.business2Channel(pobj, "pushDeliveryOrder");
}
//订单状态 已接单 目前360在用
......
const system = require("../../../system");
var settings = require("../../../../config/settings");
const querystring = require('querystring');
const settings = require("../../../../config/settings");
const AppServiceBase = require("../../app.base");
//不要在此类中增加新的方法
class UtilsPushService extends AppServiceBase {
constructor() {
super();
};
async aliBusiness2Delivery(pobj, opType) {//供业务调用,在代码中调用,不在db中做配置进行调用
async business2Channel(pobj, opType) {//供业务调用,在代码中调用,不在db中做配置进行调用,适用所有渠道推送
pobj.actionType = "getAppInterface";
var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
let reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
let 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/aliBusiness2Delivery",
content: JSON.stringify(pobj),
resultInfo: productItemInterfaceResult.data ? JSON.stringify(productItemInterfaceResult.data) : "接口数据为空",
optitle: opType + "推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
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 business2Channel(pobj, opType) {//供业务调用,在代码中调用,不在db中做配置进行调用
console.log("business2Channel++++++++start++++++++++");
console.log(pobj, "business2Channel++++++++++++++++++");
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/business2Channel",
content: JSON.stringify(pobj),
resultInfo: productItemInterfaceResult.data ? JSON.stringify(productItemInterfaceResult.data) : "接口数据为空",
optitle: opType + "推送获取的接口信息->business2Channel",
});
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 aliBusiness2Fq(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.execClientNew.execLogs(`${pobj.opType}推送蜂擎获取的接口信息->aliBusiness2Fq->app(getAppInterface)`, pobj, "center-channel-utilsPushSve-aliBusiness2Fq", productItemInterfaceResult.data, null);
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 business2Fq(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/business2Fq",
content: JSON.stringify(pobj),
resultInfo: productItemInterfaceResult.data ? JSON.stringify(productItemInterfaceResult.data) : "接口数据为空",
optitle: pobj.opType + "推送蜂擎获取的接口信息->business2Fq",
});
if (pobj.interface_info) {
this.execClientNew.execLogs(`${pobj.opType}推送蜂擎获取的接口信息->business2Channel->app(getAppInterface)`, pobj, "center-channel-utilsPushSve-business2Channel", productItemInterfaceResult.data, null);
if (pobj.interface_info && pobj.interface_info.length > 0) {
await this.pushBusInfo(pobj, opType, 1);
return system.getResultSuccess();
}
......@@ -97,7 +29,7 @@ class UtilsPushService extends AppServiceBase {
return system.getResult(null, "暂无推送配置");
}
var interface_list_temp = interface_list.filter(f => f.op_type == opType);
console.log(interface_list_temp, "interface_list_temp+++++++++++++++");
// console.log(interface_list_temp, "interface_list_temp+++++++++++++++");
if (!interface_list_temp || interface_list_temp.length == 0) {
return system.getResult(null, "暂无【" + opType + "】的推送配置");
}
......@@ -133,8 +65,7 @@ class UtilsPushService extends AppServiceBase {
}
async reflexAction(interface_info, opType, pobj, isDelProductInfo) {
console.log(interface_info, "reflexAction+++++++++++++++" + opType);
console.log(pobj, "reflexAction++++++2+++++++++" + opType);
console.log(`pobj=${JSON.stringify(pobj)},interface_info=${JSON.stringify(interface_info)}`, `reflexAction.......opType=${opType}`);
var refResult = null;
pobj.interface_info = interface_info;
pobj.opType = opType;
......@@ -179,56 +110,6 @@ class UtilsPushService extends AppServiceBase {
}
}
//---------百度---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",
pobj: pobj
});
if (pobj.interface_info) {
var pushBusInfo = await this.pushBusInfo(pobj, opType, 1);
return system.getResultSuccess(pushBusInfo);
}
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;
console.log(pobj, "baiduBusiness2Delivery-zhuangbing------------------------------" + opType);
console.log(productItemInterfaceResult);
//日志记录
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",
pobj: pobj
});
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;
......@@ -102,7 +102,7 @@ class utils360Sve extends AppServiceBase {
appInfo: pobj.appInfo
}
// 还需要推送fq 需要提醒会计。目前没有
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "submitService");
this.utilsPushSve.business2Channel(deliveryObj, "submitService");
return system.getResultSuccess({orderNo:pobj.actionBody.orderNo});
}
......@@ -160,7 +160,7 @@ class utils360Sve extends AppServiceBase {
deliveryObj.actionBody.serviceStartTime = actionBody.serviceStartTime,
deliveryObj.actionBody.serviceEndTime = actionBody.serviceEndTime
}
this.utilsPushSve.aliBusiness2Delivery(deliveryObj, "notifyService");
this.utilsPushSve.business2Channel(deliveryObj, "notifyService");
return system.getResultSuccess();
}
......
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