Merge remote-tracking branch 'origin/mark' into yonghui

This commit is contained in:
苏尹岚
2019-12-27 17:52:23 +08:00
16 changed files with 239 additions and 83 deletions

View File

@@ -163,6 +163,17 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
isDuplicated, order, err := c.addOrderStatus(orderStatus, db)
if err == nil {
dao.Commit(db)
if orderStatus.Status == model.OrderStatusWaybillTipChanged {
if order, err2 := c.LoadOrder(orderStatus.VendorOrderID, orderStatus.VendorID); err2 == nil {
if handler := partner.GetWaybillTipUpdater(orderStatus.RefVendorID); handler != nil {
tipFee, err2 := handler.GetWaybillTip(jxcontext.AdminCtx, vendorOrgCode, order.VendorStoreID, orderStatus.RefVendorOrderID, orderStatus.VendorOrderID, "")
if err2 == nil {
order.WaybillTipMoney = tipFee
c.UpdateOrderFields(order, []string{"WaybillTipMoney"})
}
}
}
}
if !isDuplicated {
if order != nil {
order.Skus = c.loadOrderSku(db, order.VendorOrderID, order.VendorID)