Commit f15047e3 by 任晓松

update 腾讯订单导入

parent d26bcc19
......@@ -2291,22 +2291,17 @@ class OrderInfoService extends ServiceBase {
const tx_product = platformConfig.config.pdict.tx_product;
let arr = pobj.actionBody.ordersArr;
let uapp_id = pobj.actionBody.uapp_id;
/*{
number:"N202102251259eaduJjc",需求号 || 订单号
status:"待处理,提交方案,已成单等" //单子状态
companyName:"公司名称",//公司名称
createdAt:"2021-02-25 10:30:11",创建时间
area:"扬州",//区域
productType:"公司注册",//产品名称
personName:"联系人",
personMobile:"联系人电话",
price:"8.80" //价格 ps: 订单会有这个字段
}*/
let sql = 'select channelOrderNo from c_order_info where uapp_id = :uapp_id';
let whereParam = {
uapp_id: uapp_id
}
let ret = await this.customQuery(sql, whereParam);
let productSql = `select path_name,item_name from center_app.p_product where uapp_id = 53`;
let rtn = await this.customQuery(productSql);
let dict = {};
rtn.forEach(item =>{
dict[item.item_name] = item.path_name;
})
let existIds = ret.map(item => {
return item.channelOrderNo;
})
......@@ -2365,7 +2360,9 @@ class OrderInfoService extends ServiceBase {
price: order.price,//定价
quantity: 1,// 订单数量(即产品的倍数,默认值为1)
opPayType: "10",// 操作付款类型:00: 创建订单, 10: 补单
created_at: order.createdAt
created_at: order.createdAt,
pathName:dict[order.productType],
pathCode: tx_product[order.productType]
};
productsArr.push(orderProductObj);
}
......
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