- fix bug in updateStoreSkusWithoutSync

This commit is contained in:
gazebo
2018-10-24 20:27:22 +08:00
parent 576709a0bd
commit 442b8c6db3
8 changed files with 35 additions and 18 deletions

View File

@@ -280,9 +280,8 @@ func updateStoreSkusWithoutSync(ctx *jxcontext.Context, storeID int, skuBindInfo
}
}
for _, v := range allBinds {
inSkuBind := inSkuBinsMap[v.SkuID]
inSkuBind := inSkuBinsMap[v.RealSkuID]
var skuBind *model.StoreSkuBind
// globals.SugarLogger.Debug(ok)
if v.ID == 0 {
if skuBindInfo.IsFocus == 1 {
skuBind = &model.StoreSkuBind{
@@ -358,7 +357,7 @@ func updateStoreSkusWithoutSync(ctx *jxcontext.Context, storeID int, skuBindInfo
}
}
if skuBind != nil && num == 1 {
needSyncIDMap[skuBind.ID] = 1
needSyncIDMap[skuBind.SkuID] = 1
}
}
}