京东订单newraingprice修改测试

This commit is contained in:
苏尹岚
2020-06-02 08:35:21 +08:00
parent 33071ea7b7
commit 73d99734f2
2 changed files with 8 additions and 7 deletions

View File

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