This commit is contained in:
邹宗楠
2021-12-13 17:54:32 +08:00
parent ba92d2de5f
commit 4ade6b8bad

View File

@@ -404,31 +404,31 @@ 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,
}) })
} }
if storeSku.Img5 != "" { if storeSku.Img5 != "" {
photos = append(photos, map[string]interface{}{ photos = append(photos, map[string]interface{}{
"is_master": false, "is_master": 0,
"url": storeSku.Img5, "url": storeSku.Img5,
}) })
} }