This commit is contained in:
邹宗楠
2024-01-29 22:56:38 +08:00
parent c670018c1a
commit bfb05c5cac

View File

@@ -230,7 +230,7 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
}
globals.SugarLogger.Debugf("==============i: %d len: %d", i, len(fromFoodList))
if len(fromFoodList) < 100 {
break
return nil, nil
}
i++
}
@@ -261,9 +261,9 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
}
skus := make([]interface{}, 0)
for k, v := range storeSku.SkuList {
for _, v := range storeSku.SkuList {
if v.SkuId == "" {
v.SkuId = utils.Int64ToStr(time.Now().UnixNano() + int64(k))
v.SkuId = storeSku.AppFoodCode
}
mapSkuList := utils.Struct2MapByJson(v)
if v.BoxNum == "" {
@@ -301,6 +301,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
foodData["picture_contents"] = storeSku.PictureContents
foodData["sequence"] = storeSku.Sequence
foodData["tag_id"] = storeSku.TagID
foodData["upc"] = "no_upc"
foodDataList[i] = foodData
}