This commit is contained in:
苏尹岚
2021-03-26 16:11:37 +08:00
parent 9aa44c38d1
commit 8e561af698
2 changed files with 79 additions and 172 deletions

View File

@@ -1274,7 +1274,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
if err != nil || storeDetail == nil {
continue
}
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync, step 0")
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
if len(storeIDs) > 1 {
if storeDetail.StoreLevel == "D" || storeDetail.StoreLevel == "E" {
@@ -1282,12 +1281,10 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
}
}
}
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync, step 1")
scaleFactor := float64(1)
if isScale {
scaleFactor = 100 / float64(jxutils.ConstrainPayPercentage(storeDetail.PayPercentage))
}
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync, step 2")
for _, skuBindInfo := range skuBindInfos {
// 关注且没有给价时需要尝试从store_sku_bind中得到已有的单价
needGetExistingUnitPrice := skuBindInfo.UnitPrice == 0 && skuBindInfo.IsFocus == 1