This commit is contained in:
邹宗楠
2024-07-03 14:42:05 +08:00
parent 561a28bbb2
commit 7c20be8f06

View File

@@ -56,21 +56,25 @@ func CompareJxVendorSku(jxStoreId int, vendorIds []int) (string, error) {
case model.VendorIDMTWM:
if errs := MtWmSyncSkuPriceAndStatus(db, sm, skuMap); errs != nil {
errListToStr.WriteString(errs.Error())
globals.SugarLogger.Debugf("美团同步商品异常信息: %v", errs)
}
continue
case model.VendorIDEBAI:
if errs := EBaiSyncSkuPriceAndStatus(db, sm, skuMap); errs != nil {
errListToStr.WriteString(errs.Error())
globals.SugarLogger.Debugf("饿百同步商品异常信息: %v", errs)
}
continue
case model.VendorIDDD:
if errs := TiktokSyncSkuPriceAndStatus(db, sm, skuMap); errs != nil {
errListToStr.WriteString(errs.Error())
globals.SugarLogger.Debugf("抖音同步商品异常信息: %v", errs)
}
continue
case model.VendorIDTaoVegetable:
if errs := TaoSyncSkuPriceAndStatus(db, sm, skuMap, skuIdList); errs != nil {
errListToStr.WriteString(errs.Error())
globals.SugarLogger.Debugf("淘宝同步商品异常信息: %v", errs)
}
continue
default:
@@ -102,7 +106,7 @@ func MtWmSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
foodList, err := mtApi.RetailListAll(sm.VendorStoreID, i)
if err != nil {
globals.SugarLogger.Debugf("美团商品价格和上下架状态获取平台商品异常 :%v", err)
continue
break
}
foodListData = append(foodListData, foodList...)
if len(foodList) < 100 {
@@ -170,8 +174,8 @@ func EBaiSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
}
foodList, err := ebaiApi.SkuList(sm.VendorStoreID, param)
if err != nil {
globals.SugarLogger.Debugf("美团商品价格和上下架状态获取平台商品异常 :%v", err)
continue
globals.SugarLogger.Debugf("饿了么商品价格和上下架状态获取平台商品异常 :%v", err)
break
}
foodListData = append(foodListData, foodList.List...)
@@ -318,7 +322,7 @@ func TiktokSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[s
foodList, err := tiktokApi.GetSkuDetailList(param)
if err != nil {
globals.SugarLogger.Debugf("抖音商品价格和上下架状态获取平台商品异常 :%v", err)
continue
break
}
foodListData = append(foodListData, foodList.Data...)