UpdateOrderWaybillTip
This commit is contained in:
@@ -163,6 +163,19 @@ 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 handler := partner.GetWaybillTipUpdater(orderStatus.RefVendorID); handler != nil {
|
||||
tipFee, err2 := handler.GetWaybillTip(jxcontext.AdminCtx, vendorOrgCode, orderStatus.RefVendorOrderID, orderStatus.VendorOrderID, "")
|
||||
if err2 == nil {
|
||||
c.UpdateOrderFields(&model.GoodsOrder{
|
||||
VendorOrderID: orderStatus.RefVendorOrderID,
|
||||
VendorID: orderStatus.RefVendorID,
|
||||
VendorOrgCode: vendorOrgCode,
|
||||
WaybillTipMoney: tipFee,
|
||||
}, []string{"WaybillTipMoney"})
|
||||
}
|
||||
}
|
||||
}
|
||||
if !isDuplicated {
|
||||
if order != nil {
|
||||
order.Skus = c.loadOrderSku(db, order.VendorOrderID, order.VendorID)
|
||||
|
||||
Reference in New Issue
Block a user