This commit is contained in:
邹宗楠
2021-12-13 19:03:30 +08:00
parent b4f1d0627e
commit 0250abce53

View File

@@ -404,25 +404,25 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate, isE
} }
photos := []map[string]interface{}{ photos := []map[string]interface{}{
map[string]interface{}{ map[string]interface{}{
"is_master": true, "is_master": 1,
"url": img, "url": img,
}, },
} }
if storeSku.Img2 != "" { if storeSku.Img2 != "" {
photos = append(photos, map[string]interface{}{ photos = append(photos, map[string]interface{}{
"is_master": false, "is_master": 0,
"url": storeSku.Img2, "url": storeSku.Img2,
}) })
} }
if storeSku.Img3 != "" { if storeSku.Img3 != "" {
photos = append(photos, map[string]interface{}{ photos = append(photos, map[string]interface{}{
"is_master": false, "is_master": 0,
"url": storeSku.Img3, "url": storeSku.Img3,
}) })
} }
if storeSku.Img4 != "" { if storeSku.Img4 != "" {
photos = append(photos, map[string]interface{}{ photos = append(photos, map[string]interface{}{
"is_master": false, "is_master": 0,
"url": storeSku.Img4, "url": storeSku.Img4,
}) })
} }