diff --git a/business/jxcallback/scheduler/basesch/basesch_ext.go b/business/jxcallback/scheduler/basesch/basesch_ext.go index 556879844..a0b537749 100644 --- a/business/jxcallback/scheduler/basesch/basesch_ext.go +++ b/business/jxcallback/scheduler/basesch/basesch_ext.go @@ -41,13 +41,13 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order * courierVendorID := storeCourier.VendorID bill, err2 := c.CreateWaybill(courierVendorID, order, maxDeliveryFee) if err = err2; err == nil { - stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "") - if len(stores) > 0 { - if stores[0].PayPercentage <= 50 { - order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 100 - dao.UpdateEntity(dao.GetDB(), order, "NewEarningPrice") - } - } + // stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "") + // if len(stores) > 0 { + // if stores[0].PayPercentage <= 50 { + // order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 100 + // dao.UpdateEntity(dao.GetDB(), order, "NewEarningPrice") + // } + // } globals.SugarLogger.Debugf("CreateWaybillOnProviders orderID:%s userName:%s vendorID:%d bill:%v", order.VendorOrderID, userName, courierVendorID, bill) bills = append(bills, bill) if createOnlyOne { diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index a194711a5..4185d3501 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -73,6 +73,7 @@ func (c *PurchaseHandler) updateOrderFinancialInfo(a *jdapi.API, orderID string) if err == nil { if orderSettlement != nil { updateOrderBySettleMent(order, orderSettlement) + globals.SugarLogger.Debugf("updateOrderBySettleMent", order.NewEarningPrice) err = partner.CurOrderManager.UpdateOrderFields(order, []string{ /*"WaybillTipMoney", */ "TotalShopMoney", "PmSubsidyMoney", "NewEarningPrice"}) } }