- order.WaybillVendorID default to order vendor.

This commit is contained in:
gazebo
2018-07-18 09:44:53 +08:00
parent 9ab535fa3b
commit 15439779b2
4 changed files with 4 additions and 2 deletions

View File

@@ -115,6 +115,7 @@ func (c *OrderController) getOrderInfo(orderID string) (order *model.GoodsOrder,
order = &model.GoodsOrder{
VendorOrderID: orderID,
VendorID: model.VendorIDELM,
WaybillVendorID: model.VendorIDELM,
VendorStoreID: utils.Int64ToStr(utils.MustInterface2Int64(result["shopId"])),
StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(result["openId"]), 0)),
StoreName: result["shopName"].(string),

View File

@@ -65,6 +65,7 @@ func (c *OrderController) getOrderInfo(msg *jdapi.CallbackOrderMsg) (order *mode
order = &model.GoodsOrder{
VendorOrderID: msg.BillID,
VendorID: model.VendorIDJD,
WaybillVendorID: model.VendorIDJD,
VendorStoreID: result["produceStationNo"].(string),
StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(result["produceStationNoIsv"]), 0)),
StoreName: result["produceStationName"].(string),

View File

@@ -133,7 +133,7 @@ func (c *WaybillController) CancelWaybill(bill *model.Waybill) (err error) {
return nil
}
// 生成mtps deliveryid为了兼容现在取jxorder中的id
// todo 生成mtps deliveryid为了兼容现在取jxorder中的id
func (c *WaybillController) getDeliveryID(order *model.GoodsOrder, db orm.Ormer) (retVal int64, err error) {
jxorder := &legacyorder.Jxorder2{
OrderId: utils.Str2Int64(order.VendorOrderID),

View File

@@ -74,7 +74,7 @@ func (c *OrderController) saveOrder(order *model.GoodsOrder, isAdjust bool, db o
c.updateOrderOtherInfo(order, db)
db.Begin()
// globals.SugarLogger.Debugf("new order:%v", order)
order.WaybillVendorID = model.VendorIDUnknown
// order.WaybillVendorID = model.VendorIDUnknown
order.OrderFinishedAt = utils.DefaultTimeValue
order.ID = 0
created, _, err2 := db.ReadOrCreate(order, "VendorOrderID", "VendorID")