From 868cce8445e3bbb2bbf65545eef112257881532e Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 23 Dec 2019 10:31:00 +0800 Subject: [PATCH] =?UTF-8?q?UpdateActPrice4StoreSkuNameNew=E4=B8=ADEarningP?= =?UTF-8?q?rice=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/store_sku.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 1dd2452ed..712136722 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -1275,18 +1275,14 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI v.ActPrice = int(actStoreSku.ActualActPrice) v.ActID = actStoreSku.ActID v.ActType = actStoreSku.Type + v.EarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.ActPrice), int64(v.ActPrice), skuName.PayPercentage)) } if actStoreSku := actStoreSkuMap4EarningPrice.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil { v.EarningPrice = int(actStoreSku.EarningPrice) v.EarningActID = actStoreSku.ActID - } else { + } else if v.EarningPrice == 0 { v.EarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.BindPrice), skuName.PayPercentage)) } - - // v.RealEarningPrice = v.EarningPrice - // if v.RealEarningPrice == 0 { - // v.RealEarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.BindPrice), skuName.PayPercentage)) - // } } } else { skuName.UnitPrice = skuName.Price