From cb15740cb94ea784c9ad0cf1e1e50d6de5818e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 30 Jun 2023 18:00:46 +0800 Subject: [PATCH] 1 --- .../partner/purchase/tao_vegetable/store_sku2.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index bffb7c8a2..f1ac07499 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -235,13 +235,13 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync totalCount := len(storeSkuList) for index, v := range storeSkuList { updateSku := domain585.AlibabaWdkSkuUpdateSkuDo{ - OuCode: utils.String2Pointer(vendorStoreID), - SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)), - SkuName: utils.String2Pointer(v.SkuName), - MemberPrice: utils.String2Pointer("45"), - SkuPrice: utils.String2Pointer("45"), - CategoryCode: utils.String2Pointer(utils.Int2Str(v.CategoryID)), - BackCatCode: utils.String2Pointer(v.SkuVendorCatID), + OuCode: utils.String2Pointer(vendorStoreID), + SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)), + SkuName: utils.String2Pointer(v.SkuName), + MemberPrice: utils.String2Pointer(utils.Float64ToStr(float64(v.UnitPrice) / float64(100))), + SkuPrice: utils.String2Pointer(utils.Float64ToStr(float64(v.UnitPrice) / float64(100))), + CategoryCode: utils.String2Pointer(utils.Int2Str(v.CategoryID)), + MerchantCatCode: utils.String2Pointer(v.SkuVendorCatID), } if v.MinOrderCount <= model.YES { updateSku.PurchaseQuantity = utils.Int64ToPointer(model.YES) // 起购单位 @@ -320,7 +320,6 @@ func createTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync DeliveryStorage: utils.String2Pointer(tao_vegetable.CreateItemDeliveryStorage), TemporaryFlag: utils.Int64ToPointer(model.NO), IsOnline: utils.Int64ToPointer(tao_vegetable.CreateIsOnline), - BackCatCode: utils.String2Pointer(storeSku.VendorCatID), MerchantCatCode: utils.String2Pointer(storeSku.VendorCatID), // 优先使用 靠后 category_code } sku.SkuPicUrls = uploadImg(api, []string{storeSku.ImgOrigin, storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5, storeSku.DescImg})