- handle len(allBinds) == 0 in updateStoresSkusWithoutSync
This commit is contained in:
@@ -522,6 +522,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, storeIDs []int, skuBind
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if err = dao.GetRows(db, &allBinds, sql, sqlParams...); err == nil {
|
||||
if len(allBinds) > 0 {
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(allBinds, false))
|
||||
inSkuBinsMap := make(map[int]*StoreSkuBindSkuInfo, len(inSkuBinds))
|
||||
for _, v := range inSkuBinds {
|
||||
@@ -616,6 +617,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, storeIDs []int, skuBind
|
||||
needSyncIDMap[skuBind.SkuID] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dao.Rollback(db)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user