+ GoodsOrder.WaybillTipMoney

This commit is contained in:
gazebo
2019-07-31 15:23:35 +08:00
parent 75e5e99273
commit adc570ee2e
2 changed files with 3 additions and 1 deletions

View File

@@ -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"`

View File

@@ -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
}