京东订单newraingprice修改测试
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user