1
This commit is contained in:
@@ -156,6 +156,7 @@ type Skus struct {
|
|||||||
|
|
||||||
// BatchInitData 批量创建商品
|
// BatchInitData 批量创建商品
|
||||||
func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string) error {
|
func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string) error {
|
||||||
|
globals.SugarLogger.Debugf("=")
|
||||||
foodDataList := make([]map[string]interface{}, len(fromSku))
|
foodDataList := make([]map[string]interface{}, len(fromSku))
|
||||||
for i, storeSku := range fromSku {
|
for i, storeSku := range fromSku {
|
||||||
foodData := make(map[string]interface{})
|
foodData := make(map[string]interface{})
|
||||||
@@ -167,8 +168,8 @@ func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mt
|
|||||||
}
|
}
|
||||||
skus2 := make([]*Skus, 0, 0)
|
skus2 := make([]*Skus, 0, 0)
|
||||||
for i2 := 0; i2 < len(skus); i2++ {
|
for i2 := 0; i2 < len(skus); i2++ {
|
||||||
if skus[i].Weight != "" && skus[i].WeightForUnit != "" {
|
if skus[i2].Weight != "" && skus[i2].WeightForUnit != "" {
|
||||||
skus[i].WeightForUnit = ""
|
skus[i2].WeightForUnit = ""
|
||||||
}
|
}
|
||||||
skus2 = append(skus2, skus2[i2])
|
skus2 = append(skus2, skus2[i2])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user