- fix bug in IntMap2List

This commit is contained in:
gazebo
2018-10-25 17:52:29 +08:00
parent 086768b4ef
commit c58905dd8e
2 changed files with 3 additions and 2 deletions

View File

@@ -247,7 +247,6 @@ func UpdateStoreSkus(ctx *jxcontext.Context, storeID int, skuBindInfos []*StoreS
} }
func updateStoreSkusWithoutSync(ctx *jxcontext.Context, storeID int, skuBindInfos []*StoreSkuBindInfo, userName string) (needSyncSkus []int, err error) { func updateStoreSkusWithoutSync(ctx *jxcontext.Context, storeID int, skuBindInfos []*StoreSkuBindInfo, userName string) (needSyncSkus []int, err error) {
var num int64
db := dao.GetDB() db := dao.GetDB()
needSyncIDMap := make(map[int]int) needSyncIDMap := make(map[int]int)
dao.Begin(db) dao.Begin(db)
@@ -282,8 +281,9 @@ func updateStoreSkusWithoutSync(ctx *jxcontext.Context, storeID int, skuBindInfo
} }
} }
for _, v := range allBinds { for _, v := range allBinds {
var num int64
inSkuBind := inSkuBinsMap[v.RealSkuID] inSkuBind := inSkuBinsMap[v.RealSkuID]
globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false)) // globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false))
var skuBind *model.StoreSkuBind var skuBind *model.StoreSkuBind
if v.ID == 0 { if v.ID == 0 {
if skuBindInfo.IsFocus == 1 { if skuBindInfo.IsFocus == 1 {

View File

@@ -110,6 +110,7 @@ func IntMap2List(intMap map[int]int) []int {
index := 0 index := 0
for k := range intMap { for k := range intMap {
retVal[index] = k retVal[index] = k
index++
} }
return retVal return retVal
} }