From 21ff04a78d6151356bbcc199628b4cb2540856c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 27 Mar 2020 15:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E8=B1=B9=E4=BF=AE=E6=94=B9=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E5=B0=9D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync_store_sku.go | 5 +++-- business/partner/partner_store_sku.go | 2 +- business/partner/purchase/yb/store_sku.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 8a7fc1d98..91c5594b5 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -232,6 +232,7 @@ func storeSkuSyncInfo2Bare(inSku *dao.StoreSkuSyncInfo) (outSku *partner.StoreSk Status: inSku.MergedStatus, VendorPrice: inSku.VendorPrice, Seq: inSku.Seq, + JxPrice: inSku.Price, } if !isStoreSkuSyncNeedDelete(inSku) { outSku.Stock = model.MaxStoreSkuStockQty @@ -528,8 +529,8 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag priceList = priceList[:] priceList = rList2 for _, v := range priceList { - price, _ := GetSkuNamePrice(db, v.SkuID, int64(v.JxPrice)) - v.JxPrice = int(price) + price, _ := GetSkuNamePrice(db, v.SkuID, v.JxPrice) + v.JxPrice = price } } } diff --git a/business/partner/partner_store_sku.go b/business/partner/partner_store_sku.go index a0ac1f956..38b1b634a 100644 --- a/business/partner/partner_store_sku.go +++ b/business/partner/partner_store_sku.go @@ -49,7 +49,7 @@ type StoreSkuInfo struct { ActPrice int64 `json:"actPrice,omitempty"` VendorActID string `json:"vendorActID,omitempty"` IsSpecialty int `json:"isSpecialty,omitempty"` - JxPrice int `json:"jxPrice,omitempty"` + JxPrice int64 `json:"jxPrice,omitempty"` } type StoreSkuInfoWithErr struct { diff --git a/business/partner/purchase/yb/store_sku.go b/business/partner/purchase/yb/store_sku.go index 7783ddfde..13dd12352 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(int64(v.JxPrice))), + BuyPrice: utils.Float64ToPointer(jxutils.IntPrice2Standard(v.JxPrice)), } err = api.YinBaoAPI.UpdateProductInfo(productInfo) if err != nil {