This commit is contained in:
邹宗楠
2023-07-03 10:08:57 +08:00
parent c0e195268d
commit f6957e76b6

View File

@@ -368,9 +368,10 @@ func createTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync
if (index+model.YES)%tao_vegetable.MAXHandleCount == model.NO || index+model.YES == totalCount {
createPram.ParamList = &param
result, err := api.AddStoreSku(createPram)
globals.SugarLogger.Debugf("创建淘鲜达商品异常 result :%s", utils.Format4Output(result, false))
if err != nil {
globals.SugarLogger.Debugf("创建淘鲜达商品异常:%s", err.Error())
//failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDTaoVegetable], syncType)
}
// 记录失败的同步数据
failedList, vendorSkuIdMap = SelectStoreSkuListByFoodList(storeSkuList, *result, storeID, model.VendorChineseNames[model.VendorIDTaoVegetable], syncType)
@@ -695,6 +696,7 @@ func (p *PurchaseHandler) GetSensitiveWordRegexp() *regexp.Regexp {
// SelectStoreSkuListByFoodList 淘宝批量返回
func SelectStoreSkuListByFoodList(storeSkuList interface{}, foodList []tao_vegetable.VegetableResultList, storeID int, vendorName, syncType string) (selectedStoreSkuList []*partner.StoreSkuInfoWithErr, successMap map[string]string) {
globals.SugarLogger.Debugf("=======foodList := %s", utils.Format4Output(foodList, false))
foodMap := make(map[string]string, len(foodList))
if len(foodList) > 0 {
for _, v := range foodList {
@@ -740,6 +742,9 @@ func SelectStoreSkuListByFoodList(storeSkuList interface{}, foodList []tao_veget
}
}
}
globals.SugarLogger.Debugf("=======selectedStoreSkuList := %s", utils.Format4Output(selectedStoreSkuList, false))
globals.SugarLogger.Debugf("=======successMap := %s", utils.Format4Output(successMap, false))
return selectedStoreSkuList, successMap
}