diff --git a/business/model/order.go b/business/model/order.go index 66f6e5ed8..34ea315e8 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -23,6 +23,7 @@ type GoodsOrder struct { TotalShopMoney int64 `json:"totalShopMoney"` // 应结金额-第三方平台结算给京西的金额(包括了所有的补贴,扣除) PmSubsidyMoney int64 `json:"pmSubsidyMoney"` // 平台活动补贴(订单主体活动补贴+订单单条sku补贴)1+ DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值) + WaybillTipMoney int64 `json:"waybillTipMoney"` // 平台配送小费 EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费) Weight int `json:"weight"` // 单位为克 ConsigneeName string `orm:"size(32)" json:"consigneeName"` diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index 861604b5a..bc2a31016 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -52,7 +52,7 @@ func (c *PurchaseHandler) updateOrderFinancialInfo(orderID string) (err error) { if err == nil { if orderSettlement != nil { updateOrderBySettleMent(order, orderSettlement) - err = partner.CurOrderManager.UpdateOrderFields(order, []string{"TotalShopMoney", "PmSubsidyMoney"}) + err = partner.CurOrderManager.UpdateOrderFields(order, []string{"WaybillTipMoney", "TotalShopMoney", "PmSubsidyMoney"}) } } return err @@ -95,6 +95,7 @@ func (c *PurchaseHandler) onOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.OrderSettlementInfo) { if orderSettlement != nil { + order.WaybillTipMoney = orderSettlement.VenderPaidTips order.TotalShopMoney = orderSettlement.SettlementAmount order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney }