diff --git a/business/model/order_financial.go b/business/model/order_financial.go index 5eb38bef3..d92c493a4 100644 --- a/business/model/order_financial.go +++ b/business/model/order_financial.go @@ -36,6 +36,7 @@ type OrderFinancial struct { JxSubsidyMoney int64 `json:"jxSubsidyMoney"` // 京西总补贴 JxSkuSubsidyMoney int64 `json:"jxSkuSubsidyMoney"` // 京西补贴给单条sku的金额 JxShopMoney int64 `json:"jxShopMoney"` // 店铺应结金额-京西结算给店铺的金额M + DownFlag int64 `json:"downFlag"` // 0--正常单, 1--降级单 Skus []*OrderSkuFinancial `orm:"-" json:"skus"` // 正向订单购买商品列表 Discounts []*OrderDiscountFinancial `orm:"-" json:"discounts"` // 正向订单享受优惠列表 } diff --git a/business/partner/purchase/ebai/financial.go b/business/partner/purchase/ebai/financial.go index a3b375964..015b4c691 100644 --- a/business/partner/purchase/ebai/financial.go +++ b/business/partner/purchase/ebai/financial.go @@ -161,20 +161,20 @@ func (p *PurchaseHandler) AfsOrderDetail2Financial(orderData map[string]interfac // 存储饿百正向订单结账信息 func (p *PurchaseHandler) OnOrderDetail(result map[string]interface{}, operation string) (err error) { - err = partner.CurOrderManager.SaveOrderFinancialInfo(p.OrderDetail2Financial(p.GetTrueEbaiOrder(result)), operation) + err = partner.CurOrderManager.SaveOrderFinancialInfo(p.OrderDetail2Financial(result), operation) return err } -func (p *PurchaseHandler) GetTrueEbaiOrder(result1 map[string]interface{}) (result2 map[string]interface{}) { - order := result1["order"].(map[string]interface{}) - if utils.MustInterface2Int64(order["down_flag"]) == 1 { - result, err := api.EbaiAPI.OrderGet(utils.Interface2String(order["order_id"])) - if err == nil { - return p.GetTrueEbaiOrder(result) - } - } - return result1 -} +// func (p *PurchaseHandler) GetTrueEbaiOrder(result1 map[string]interface{}) (result2 map[string]interface{}) { +// order := result1["order"].(map[string]interface{}) +// if utils.MustInterface2Int64(order["down_flag"]) == 1 { +// result, err := api.EbaiAPI.OrderGet(utils.Interface2String(order["order_id"])) +// if err == nil { +// return p.GetTrueEbaiOrder(result) +// } +// } +// return result1 +// } func (p *PurchaseHandler) OrderDetail2Financial(result map[string]interface{}) (orderFinancial *model.OrderFinancial) { orderFinancial = &model.OrderFinancial{ @@ -186,6 +186,7 @@ func (p *PurchaseHandler) OrderDetail2Financial(result map[string]interface{}) ( // orderFinancial.DeliveryConfirmTime = getTimeFromInterface(order1["finished_time"]) orderFinancial.TotalDiscountMoney = utils.MustInterface2Int64(order1["discount_fee"]) orderFinancial.ReceivableFreight = utils.MustInterface2Int64(order1["send_fee"]) + orderFinancial.DownFlag = utils.MustInterface2Int64(order1["down_flag"]) if int(getInt64FromInterface(order1["delivery_party"])) == ebaiapi.SendImmediatelySelf { orderFinancial.SelfDeliveryDiscountMoney = orderFinancial.ReceivableFreight