淘鲜达白底图上传
This commit is contained in:
@@ -159,7 +159,6 @@ type Skus struct {
|
||||
|
||||
// BatchInitData 批量创建商品
|
||||
func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string) error {
|
||||
globals.SugarLogger.Debugf("===========[] %d", len(fromSku))
|
||||
foodDataList := make([]map[string]interface{}, len(fromSku))
|
||||
for i, storeSku := range fromSku {
|
||||
foodData := make(map[string]interface{})
|
||||
@@ -226,7 +225,6 @@ func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mt
|
||||
if len(foodDataList)%10 != 0 {
|
||||
count += 1
|
||||
}
|
||||
globals.SugarLogger.Debugf("===========[count] %d", count)
|
||||
for i := 0; i < count; i++ {
|
||||
if i == count-1 {
|
||||
failedFoodList, err2 := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])
|
||||
|
||||
Reference in New Issue
Block a user