diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 0f954a663..c952b8b0a 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -232,7 +232,6 @@ func storeSkuSyncInfo2Bare(inSku *dao.StoreSkuSyncInfo) (outSku *partner.StoreSk Status: inSku.MergedStatus, VendorPrice: inSku.VendorPrice, Seq: inSku.Seq, - Price: int(inSku.Price), } if !isStoreSkuSyncNeedDelete(inSku) { outSku.Stock = model.MaxStoreSkuStockQty @@ -525,6 +524,13 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } } if len(priceList) > 0 { + _, rList2 := changeList2Yb(nil, priceList) + priceList = priceList[:] + priceList = rList2 + for _, v := range priceList { + price, _ := GetSkuNamePrice(db, v.SkuID, int64(v.Price)) + v.Price = int(price) + } fmt.Println(utils.Format4Output(priceList, false)) } } diff --git a/business/partner/purchase/yb/store_sku.go b/business/partner/purchase/yb/store_sku.go index 6be47c17a..19d497a3f 100644 --- a/business/partner/purchase/yb/store_sku.go +++ b/business/partner/purchase/yb/store_sku.go @@ -138,7 +138,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg var productInfo = &yinbaoapi.ProductInfo{ UID: utils.Str2Int64(v.VendorSkuID), SellPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(v.VendorPrice)), - BuyPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(v.VendorPrice)), + BuyPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(v.Price)), } err = api.YinBaoAPI.UpdateProductInfo(productInfo) if err != nil {