earningprice改名

This commit is contained in:
苏尹岚
2020-03-19 17:20:00 +08:00
parent f84e17f002
commit c53102acd7
5 changed files with 10 additions and 10 deletions

View File

@@ -670,7 +670,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
// saleInfo.EarningPrice += v.EarningPrice * int64(v.Count)
saleInfo.EarningPrice = v.EarningPrice2
saleInfo.EarningPrice = v.NewEarningPrice
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)
if orderMap[universalOrderID] == nil {
@@ -747,7 +747,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.SalePrice += v.SalePrice
// saleInfo.EarningPrice += v.EarningPrice
saleInfo.Count++
saleInfo.EarningPrice = v.EarningPrice2
saleInfo.EarningPrice = v.NewEarningPrice
}
for _, v := range saleInfoMap {
saleInfoList = append(saleInfoList, v)

View File

@@ -40,8 +40,8 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
if len(stores) > 0 {
if stores[0].PayPercentage <= 50 {
order.EarningPrice2 = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 10000
dao.UpdateEntity(dao.GetDB(), order, "EarningPrice2")
order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 10000
dao.UpdateEntity(dao.GetDB(), order, "NewEarningPrice")
}
}
globals.SugarLogger.Debugf("CreateWaybillOnProviders orderID:%s userName:%s vendorID:%d bill:%v", order.VendorOrderID, userName, courierVendorID, bill)