diff --git a/business/model/order.go b/business/model/order.go index c7aa0ee06..cf27e65d6 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -27,7 +27,7 @@ type GoodsOrder struct { SalePrice int64 `json:"salePrice"` // 售卖价 ActualPayPrice int64 `json:"actualPayPrice"` // 单位为分 顾客实际支付 TotalShopMoney int64 `json:"totalShopMoney"` // 应结金额-第三方平台结算给京西的金额(包括了所有的补贴,扣除) - DiscountMoney int64 `json:"discountMoney"` // 订单级优惠金额 + DiscountMoney int64 `json:"discountMoney"` // 订单总优惠金额 PmSubsidyMoney int64 `json:"pmSubsidyMoney"` // 平台活动补贴(订单主体活动补贴+订单单条sku补贴)1+ DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值) WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费 diff --git a/business/partner/purchase/ebai/order.go b/business/partner/purchase/ebai/order.go index aa582fc9e..51bd72f22 100644 --- a/business/partner/purchase/ebai/order.go +++ b/business/partner/purchase/ebai/order.go @@ -118,8 +118,8 @@ func getZengSkus(orderID string, orderMan map[string]interface{}) (skus []*model discounts, _ := orderMan["discount"].([]interface{}) for _, v := range discounts { discount := v.(map[string]interface{}) - discountMoney += utils.Interface2Int64WithDefault(discount["fee"], 0) - if utils.Interface2String(discount["type"]) == ebaiapi.OrderSkuDiscountTypeZeng { + discountType := utils.Interface2String(discount["type"]) + if discountType == ebaiapi.OrderSkuDiscountTypeZeng { sku := &model.OrderSku{ VendorOrderID: orderID, VendorID: model.VendorIDEBAI, @@ -131,6 +131,7 @@ func getZengSkus(orderID string, orderMan map[string]interface{}) (skus []*model } skus = append(skus, sku) } + discountMoney += utils.Interface2Int64WithDefault(discount["fee"], 0) } return skus, discountMoney }