Commit 08f63d9d by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents 3504da78 ef126ae9
var system = require("../../../system"); var system = require("../../../system");
const AppServiceBase = require("../../app.base"); const AppServiceBase = require("../../app.base");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
const { json } = require("sequelize");
//此类用来db中配置来进行调用-主要功能是推送蜂擎业务 //此类用来db中配置来进行调用-主要功能是推送蜂擎业务
class UtilsFqAliyunService extends AppServiceBase { class UtilsFqAliyunService extends AppServiceBase {
...@@ -9,6 +10,7 @@ class UtilsFqAliyunService extends AppServiceBase { ...@@ -9,6 +10,7 @@ class UtilsFqAliyunService extends AppServiceBase {
this.ucommuneOperatorPhone = settings.ucommuneOperatorPhone() this.ucommuneOperatorPhone = settings.ucommuneOperatorPhone()
} }
async pushOrderBusinessByProductCode2Fq(pobj) {//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送) async pushOrderBusinessByProductCode2Fq(pobj) {//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送)
console.log(JSON.stringify(pobj),".................pushOrderBusinessByProductCode2Fq...............pobj");
var verifyResult = await this.verifyParam(pobj); var verifyResult = await this.verifyParam(pobj);
var orderInfo = pobj.actionBody.order_info; var orderInfo = pobj.actionBody.order_info;
var orderContact = pobj.actionBody.order_contact ? pobj.actionBody.order_contact : pobj.actionBody.delivery_content.orderContact; var orderContact = pobj.actionBody.order_contact ? pobj.actionBody.order_contact : pobj.actionBody.delivery_content.orderContact;
...@@ -33,8 +35,8 @@ class UtilsFqAliyunService extends AppServiceBase { ...@@ -33,8 +35,8 @@ class UtilsFqAliyunService extends AppServiceBase {
} }
var interface_params_info = verifyResult.data; var interface_params_info = verifyResult.data;
var ucommuneOperatorPhone=pobj.appInfo && pobj.appInfo.contact_mobile?pobj.appInfo.contact_mobile:this.ucommuneOperatorPhone var ucommuneOperatorPhone = pobj.appInfo && pobj.appInfo.contact_mobile ? pobj.appInfo.contact_mobile : this.ucommuneOperatorPhone
console.log("推送的业务员手机号为:",this.ucommuneOperatorPhone) console.log("推送的业务员手机号为:", ucommuneOperatorPhone)
var params = { var params = {
idempotentId: orderInfo.orderNo,// 是 业务 ID idempotentId: orderInfo.orderNo,// 是 业务 ID
idempotentSource: productInfo.service_business_code,// 是 业务来源(ic_jdyun、ic_ali) idempotentSource: productInfo.service_business_code,// 是 业务来源(ic_jdyun、ic_ali)
...@@ -46,13 +48,13 @@ class UtilsFqAliyunService extends AppServiceBase { ...@@ -46,13 +48,13 @@ class UtilsFqAliyunService extends AppServiceBase {
orderPrice: orderInfo.totalSum,// 是 订单金额 orderPrice: orderInfo.totalSum,// 是 订单金额
productId: productInfo.price_item.service_code,// 是 产品 ID productId: productInfo.price_item.service_code,// 是 产品 ID
productQuantity: orderInfo.quantity,// 是 产品数量 productQuantity: orderInfo.quantity,// 是 产品数量
operator_phone: this.ucommuneOperatorPhone, // 2020 0704 推送fq 必填字段 这里以下为新增 7.7修改由写死改为从settings获取 operator_phone: ucommuneOperatorPhone, // 2020 0704 推送fq 必填字段 这里以下为新增 7.7修改由写死改为从settings获取
createdat: orderInfo.created_at,// 2020 0722 lin新增 张超推送文档新增必填字段 createdat: orderInfo.created_at,// 2020 0722 lin新增 张超推送文档新增必填字段
thirdPartyCustomerId: orderInfo.channelUserId, thirdPartyCustomerId: orderInfo.channelUserId,
pay_flow_no: orderInfo.pay_flow_no,// 支付流水号 pay_flow_no: orderInfo.pay_flow_no,// 支付流水号
pay_channel: orderInfo.pay_channel,// 支付渠道(微信、支付宝)(必填) pay_channel: orderInfo.pay_channel,// 支付渠道(微信、支付宝)(必填)
pay_time: orderInfo.pay_time,//付款时间 pay_time: orderInfo.pay_time,//付款时间
pay_payer_bank_no:orderInfo.pay_payer_bank_no//付款人账号 pay_payer_bank_no: orderInfo.pay_payer_bank_no//付款人账号
}; };
// var result = await this.opAliyunClientPost(pobj, "pushOrderBusiness", interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, params); // var result = await this.opAliyunClientPost(pobj, "pushOrderBusiness", interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, params);
var result = await this.opAliyunClientPost(pobj, interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, params); var result = await this.opAliyunClientPost(pobj, interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, params);
......
...@@ -53,6 +53,7 @@ class UtilsPushService extends AppServiceBase { ...@@ -53,6 +53,7 @@ class UtilsPushService extends AppServiceBase {
} }
async pushBusInfo(pobj, opType, isDelProductInfo) {//推送业务总入口,不在db中做配置进行调用 async pushBusInfo(pobj, opType, isDelProductInfo) {//推送业务总入口,不在db中做配置进行调用
console.log(JSON.stringify(pobj),".......pushBusInfo.........................");
var interface_list = pobj.interface_info ? pobj.interface_info : pobj.actionBody.product_info.interface_info; var interface_list = pobj.interface_info ? pobj.interface_info : pobj.actionBody.product_info.interface_info;
if (!interface_list) { if (!interface_list) {
return system.getResult(null, "暂无推送配置"); return system.getResult(null, "暂无推送配置");
......
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