This commit is contained in:
苏尹岚
2020-12-29 11:16:50 +08:00
parent 2b275a7b03
commit c3c45852b4
4 changed files with 14 additions and 16 deletions

View File

@@ -687,6 +687,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
flagVendorOrderID = skuList[0].VendorOrderID
}
for k, v := range skuList {
storeDetail, _ := dao.GetStoreDetail(db, v.StoreID, v.VendorID, "")
if v.EarningPrice == 0 {
v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, v.PayPercentage)
}
@@ -708,11 +709,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
//成都菜市
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
if v.EarningType == model.EarningTypeQuote {
if v.VendorID == model.VendorIDJD && v.CityCode == 510100 {
saleInfo.RealEarningPrice += 0
} else {
saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count)
}
saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count)
}
} else {
if v.OrderPayPercentage == 100 {
@@ -728,7 +725,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.EarningPrice = v.NewEarningPrice
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
if v.EarningType == model.EarningTypePoints {
if v.VendorID == model.VendorIDJD && v.CityCode == 510100 {
if storeDetail.VendorPayPercentage != 0 {
saleInfo.RealEarningPrice += 0
} else {
saleInfo.RealEarningPrice += v.NewEarningPrice
@@ -745,7 +742,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.EarningPrice += v.NewEarningPrice
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
if v.EarningType == model.EarningTypePoints {
if v.VendorID == model.VendorIDJD && v.CityCode == 510100 {
if storeDetail.VendorPayPercentage != 0 {
saleInfo.RealEarningPrice += 0
} else {
// && v.VendorID != model.VendorIDJD && v.CityCode != 510100