Commit ab84846f by 宋毅

价格查询

parent a9d2e5f3
......@@ -269,6 +269,7 @@ class CenterorderService extends AppServiceBase {
pobj.actionBody.orderPrice = data.data.price;
pobj.actionBody.payTotalSum = data.data.price;
pobj.actionBody.payCode = data.data.payCode;
pobj.actionBody.productPriceId = data.data.productPriceId;
pobj.actionBody.channelItemCode = data.data.channelItemCode;
pobj.actionBody.channelNeedNo = data.data.channelNeedNo;
pobj.actionBody.needNo = data.data.needNo;
......@@ -602,6 +603,7 @@ class CenterorderService extends AppServiceBase {
pobj.actionBody.orderPrice = data.data.price;
pobj.actionBody.payTotalSum = data.data.price;
pobj.actionBody.payCode = data.data.payCode;
pobj.actionBody.productPriceId = data.data.productPriceId;
pobj.actionBody.channelItemCode = data.data.channelItemCode;
pobj.actionBody.channelNeedNo = data.data.channelNeedNo;
pobj.actionBody.needNo = data.data.needNo;
......
......@@ -73,6 +73,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj.actionBody.orderPrice = data.data.price;
pobj.actionBody.payTotalSum = data.data.price;
pobj.actionBody.payCode = data.data.payCode;
pobj.actionBody.productPriceId = data.data.productPriceId;
pobj.actionBody.channelItemCode = data.data.channelItemCode;
pobj.actionBody.channelNeedNo = data.data.channelNeedNo || data.data.bizId;
pobj.actionBody.needNo = data.data.needNo;
......
......@@ -1291,6 +1291,7 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.payTotalSum = productPriceResult.data.price;
pobj.actionBody.price = productPriceResult.data.price;
pobj.actionBody.payCode = productPriceResult.data.payCode;
pobj.actionBody.productPriceId = productPriceResult.data.productPriceId;
pobj.actionBody.channelItemCode = needInfoResult.data.channelTypeCode;
pobj.actionBody.channelNeedNo = needInfoResult.data.channelNeedNo;
pobj.actionBody.needNo = needInfoResult.data.needNo;
......
......@@ -85,24 +85,29 @@ class UtilsOrderService extends AppServiceBase {
* 订单验证
*/
async isOrderVerify(pobj, actionBody) {
var price_list = actionBody.product_info.price_list;
let price_list = actionBody.product_info.price_list;
if (!price_list) {
return system.getResult(null, "产品价格列表信息有误,100040");
}
var productIndex = price_list.findIndex(f => f.pay_code == actionBody.payCode && f.is_show == 1);
let productIndex = -1;
if (actionBody.productPriceId) {
productIndex = price_list.findIndex(f => f.id == actionBody.productPriceId && f.is_show == 1);
} else {
productIndex = price_list.findIndex(f => f.pay_code == actionBody.payCode && f.is_show == 1);
}
if (productIndex < 0) {
return system.getResult(null, "支付价格payCode信息有误,100050");
}
var totalSum = Number(price_list[productIndex].price) * Number(actionBody.quantity);
var additionsIndex = -1;
let totalSum = Number(price_list[productIndex].price) * Number(actionBody.quantity);
let additionsIndex = -1;
if (actionBody.additions && actionBody.additions.payCode) {
additionsIndex = price_list.findIndex(f => f.pay_code == actionBody.additions.payCode && f.is_show == 0);
if (additionsIndex >= 0) {
totalSum = totalSum + Number(price_list[additionsIndex].price) * Number(actionBody.additions.quantity);
}
}
var buyTotalSum = Number(actionBody.totalSum || 0);
var buyPayTotalSum = Number(actionBody.payTotalSum || 0);
let buyTotalSum = Number(actionBody.totalSum || 0);
let buyPayTotalSum = Number(actionBody.payTotalSum || 0);
this.execClientNew.execLogs("isOrderVerify-5", actionBody, "center-channel-utilsOrderSve-isOrderVerify", null, null);
if (buyTotalSum === 0) {
buyTotalSum = totalSum;
......@@ -1755,8 +1760,8 @@ class UtilsOrderService extends AppServiceBase {
pobj.actionType = "receiveFqbossTmOrder";
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if(result && result.status==0){
if(pobj.appInfo && pobj.appInfo.uapp_id!=18 && !pobj.actionBody.serviceOrderNo){//京东云自助商标注册
if (result && result.status == 0) {
if (pobj.appInfo && pobj.appInfo.uapp_id != 18 && !pobj.actionBody.serviceOrderNo) {//京东云自助商标注册
await this.pushChannelOrder2fq(pobj);
}
}
......@@ -1767,17 +1772,17 @@ class UtilsOrderService extends AppServiceBase {
try {
var yfobj = {
actionBody: {
idempotentSource: pobj.productInfo.service_business_code || '' , //渠道来源 N
quantity:1,//数量 N
idempotentSource: pobj.productInfo.service_business_code || '', //渠道来源 N
quantity: 1,//数量 N
needId: pobj.actionBody.needNo || '',//需求id N
contactsName:pobj.actionBody.contactsName || '',//联系人名称 N
companyName:pobj.actionBody.applyName || '',//公司名称 N
scope:"商标自助订单进行备案,不用做任何处理",// N
contactsName: pobj.actionBody.contactsName || '',//联系人名称 N
companyName: pobj.actionBody.applyName || '',//公司名称 N
scope: "商标自助订单进行备案,不用做任何处理",// N
orderNo: pobj.actionBody.channelOrderNo,
orderPrice: 300,//写死 自助300
phone: pobj.actionBody.contactsMobile,
appName:pobj.appInfo.app_name || '',
sku:'125855508212158464' //写死 自助一个
appName: pobj.appInfo.app_name || '',
sku: '125855508212158464' //写死 自助一个
},
appInfo: pobj.appInfo
};
......@@ -1788,7 +1793,7 @@ class UtilsOrderService extends AppServiceBase {
this.logCtl.info({
optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "企服通渠道订单推送至蜂擎:,method=pushChannelOrder2fq",
op: "service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq",
content: "参数:"+JSON.stringify(pobj)+";返回结果:"+JSON.stringify(yfPushRes),
content: "参数:" + JSON.stringify(pobj) + ";返回结果:" + JSON.stringify(yfPushRes),
clientIp: ""
});
} catch (e) {
......@@ -1796,10 +1801,10 @@ class UtilsOrderService extends AppServiceBase {
this.logCtl.error({
optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "企服通渠道订单推送至蜂擎异常:,method=pushChannelOrder2fq",
op: "service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq---error",
content: "参数:"+JSON.stringify(pobj)+";异常信息:"+JSON.stringify(e.stack),
content: "参数:" + JSON.stringify(pobj) + ";异常信息:" + JSON.stringify(e.stack),
clientIp: ""
});
console.log("service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq推送异常",e.stack);
console.log("service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq推送异常", e.stack);
}
}
......@@ -1814,6 +1819,7 @@ class UtilsOrderService extends AppServiceBase {
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
async receiveAliTmStatus(pobj, actionBody) {
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
......@@ -1826,7 +1832,7 @@ class UtilsOrderService extends AppServiceBase {
* @param actionBody
* @returns {Promise<void>}
*/
async getOrderIdFrom360(pobj,actionBody){
async getOrderIdFrom360(pobj, actionBody) {
let rtnt = await this.execClient.exec360GetToken(settings.tokenUrl360())
let result = JSON.parse(rtnt.stdout);
let token = result.access_token;
......
......@@ -59,6 +59,7 @@ class utils360Sve extends AppServiceBase {
pobj.actionBody.payTotalSum = productPriceResult.data.price;
pobj.actionBody.price = productPriceResult.data.price;
pobj.actionBody.payCode = productPriceResult.data.payCode;
pobj.actionBody.productPriceId = productPriceResult.data.productPriceId;
pobj.actionBody.channelItemCode = productPriceResult.data.channelItemCode;
pobj.actionBody.quantity = 1;
pobj.actionBody.channelOrder = {
......
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