Commit c5ab604f by 兰国旗

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

parents 6575bc41 3be29ce9
......@@ -2457,9 +2457,38 @@ class OrderInfoService extends ServiceBase {
}
var orderNo = await this.getBusUid("tm" + pobj.appInfo.uapp_id);
var ab = pobj.actionBody;
var productInfo = pobj.productInfo;
ab.orderNo = orderNo;
var o = await this.dao.create(ab);
return system.getResultSuccess(o);
//订单产品
var orderProductObj = {
uapp_id: pobj.appInfo.uapp_id,
sourceOrderNo: orderNo, // 来源单号
productType_id: productInfo.productType_id,//产品类型Id
pathCode: productInfo.path_code,//产品路径
itemCode: productInfo.item_code,//产品编码
itemName: productInfo.item_name,//产品名称
channelItemCode: productInfo.channel_item_code,// 渠道产品编码
channelItemName: productInfo.channel_item_name,// 渠道产品名称
channelItemAppendName: ab.channelItemAppendName || "",//服务商产品附加名称
serviceItemCode: productInfo.service_item_code,// 服务商产品编码
payAfterJumpH5Url: productInfo.pay_after_jump_h5url || "",
payAfterJumpPcUrl: productInfo.pay_after_jump_pcurl || "",
picUrl: productInfo.pic_url,// 产品图片地址
price: productInfo.price_item.price,//定价
priceDesc: productInfo.price_item.price_desc,//定价描述
priceTypeName: productInfo.price_item.price_type_name,//定价类型名称
quantity: ab.quantity,// 订单数量(即产品的倍数,默认值为1)
opPayType: "00",// 操作付款类型:00: 创建订单, 10: 补单
serviceItemSnapshot: JSON.stringify(productInfo), //产品快照
orderSnapshot: JSON.stringify(ab)// 2020 1110 lin 新增 增加订单快照
};
var self = this;
return await self.db.transaction(async function (t) {
var o = await self.dao.create(ab);
var orderProduct = await self.orderproductDao.create(orderProductObj, t);//订单产品
return system.getResultSuccess(o);
})
}
/**
......@@ -2476,6 +2505,9 @@ class OrderInfoService extends ServiceBase {
if(!pobj.userInfo){
return system.getResult(null, "未知用户信息,100300");
}
if(!pobj.productInfo){
return system.getResult(null, "未知用户信息,100500");
}
if(!pobj.actionBody.channelOrderNo){
return system.getResult(null, "阿里订单号不能为空,100110");
}
......
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