1
This commit is contained in:
@@ -360,9 +360,7 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
param = append(param, sku)
|
param = append(param, sku)
|
||||||
|
|
||||||
if (index+model.YES)%tao_vegetable.MAXHandleCount == model.NO || index+model.YES == totalCount {
|
if (index+model.YES)%tao_vegetable.MAXHandleCount == model.NO || index+model.YES == totalCount {
|
||||||
createPram.ParamList = ¶m
|
createPram.ParamList = ¶m
|
||||||
result, err := api.AddStoreSku(createPram)
|
result, err := api.AddStoreSku(createPram)
|
||||||
@@ -738,17 +736,18 @@ func SelectStoreSkuListByFoodList(storeSkuList interface{}, foodList []tao_veget
|
|||||||
successMap = make(map[string]string)
|
successMap = make(map[string]string)
|
||||||
if len(foodList) > 0 {
|
if len(foodList) > 0 {
|
||||||
for _, v := range foodList {
|
for _, v := range foodList {
|
||||||
foodMap[v.SkuID] = v.ErrMsg
|
|
||||||
if v.ProductID != "" {
|
if v.ProductID != "" {
|
||||||
successMap[v.SkuID] = v.ProductID
|
successMap[v.SkuID] = v.ProductID
|
||||||
|
} else {
|
||||||
|
foodMap[v.SkuID] = v.ErrMsg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if storeSkuLists, ok := storeSkuList.([]*partner.StoreSkuInfo); ok {
|
if storeSkuLists, ok := storeSkuList.([]*partner.StoreSkuInfo); ok {
|
||||||
for _, v := range storeSkuLists {
|
for _, v := range storeSkuLists {
|
||||||
if foodMap[v.VendorSkuID] != "" {
|
if foodMap[utils.Int2Str(v.SkuID)] != "" {
|
||||||
foodFailed := &partner.StoreSkuInfoWithErr{
|
foodFailed := &partner.StoreSkuInfoWithErr{
|
||||||
StoreSkuInfo: v,
|
StoreSkuInfo: v,
|
||||||
ErrMsg: foodMap[v.VendorSkuID],
|
ErrMsg: foodMap[utils.Int2Str(v.SkuID)],
|
||||||
StoreID: storeID,
|
StoreID: storeID,
|
||||||
VendoreName: vendorName,
|
VendoreName: vendorName,
|
||||||
SyncType: syncType,
|
SyncType: syncType,
|
||||||
@@ -759,7 +758,7 @@ func SelectStoreSkuListByFoodList(storeSkuList interface{}, foodList []tao_veget
|
|||||||
}
|
}
|
||||||
if storeSkuLists, ok := storeSkuList.([]*dao.StoreSkuSyncInfo); ok {
|
if storeSkuLists, ok := storeSkuList.([]*dao.StoreSkuSyncInfo); ok {
|
||||||
for _, v := range storeSkuLists {
|
for _, v := range storeSkuLists {
|
||||||
if foodMap[v.VendorSkuID] != "" {
|
if foodMap[utils.Int2Str(v.SkuID)] != "" {
|
||||||
storeSkuInfo := &partner.StoreSkuInfo{
|
storeSkuInfo := &partner.StoreSkuInfo{
|
||||||
SkuID: v.SkuID,
|
SkuID: v.SkuID,
|
||||||
VendorSkuID: v.VendorSkuID,
|
VendorSkuID: v.VendorSkuID,
|
||||||
@@ -770,7 +769,7 @@ func SelectStoreSkuListByFoodList(storeSkuList interface{}, foodList []tao_veget
|
|||||||
}
|
}
|
||||||
foodFailed := &partner.StoreSkuInfoWithErr{
|
foodFailed := &partner.StoreSkuInfoWithErr{
|
||||||
StoreSkuInfo: storeSkuInfo,
|
StoreSkuInfo: storeSkuInfo,
|
||||||
ErrMsg: foodMap[v.VendorSkuID],
|
ErrMsg: foodMap[utils.Int2Str(v.SkuID)],
|
||||||
StoreID: storeID,
|
StoreID: storeID,
|
||||||
VendoreName: vendorName,
|
VendoreName: vendorName,
|
||||||
SyncType: syncType,
|
SyncType: syncType,
|
||||||
|
|||||||
Reference in New Issue
Block a user