From 51ef1c291c6bf70b2f27e34805cb937885ea6c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 24 Aug 2020 08:56:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=8F=AA=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E4=B8=89=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index ff91ee17b..f49997f1d 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1159,6 +1159,10 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend } else { err = ErrCanNotFindVendor } + storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID) + if storeDetail != nil { + return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID) + } } else if vendorID == model.VendorIDJX { ReCalculateJxPriceLight(db, ctx, storeID) } else if vendorID == model.VendorIDYB { @@ -1186,10 +1190,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend } } } - storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID) - if storeDetail != nil { - return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID) - } storeMapList, err := dao.GetStoresMapList2(db, []int{vendorID}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", true) if len(storeMapList) > 0 { _, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName) From a9d4f52e0e888fb4a7445693a4c564ec5a61de0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 24 Aug 2020 09:15:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=B7=E6=96=B0=E4=BA=AC=E4=B8=9C?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97=E4=BB=B7=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=B9=9F=E6=9B=B4=E6=96=B0=E5=95=86=E5=AE=B6=E6=94=B6=E7=9B=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 5bc54a263..fc5ab3c29 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1297,8 +1297,12 @@ func RefreshJdShopOrdersEarningPrice(ctx *jxcontext.Context, orderStartTime, ord order := &model.GoodsOrder{} order.VendorOrderID = utils.Int64ToStr(v.OrderID) dao.GetEntity(db, order, "VendorOrderID") + storeDeatil, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID) order.TotalShopMoney = utils.Float64TwoInt64(v.DueAmount * 100) - dao.UpdateEntity(db, order, "TotalShopMoney") + if order.NewEarningPrice == 0 { + jxutils.RefreshOrderEarningPrice2(order, storeDeatil.PayPercentage) + } + dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice") } } return err From 8901bb2a13679ae791d4b3cf314e23afcdf2712a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 24 Aug 2020 10:07:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=98=AF5=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jdshop/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index 42b31b0ca..0f994e1dd 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -660,7 +660,7 @@ func buildCreateWareParam(storeSku *dao.StoreSkuSyncInfo) (createSkuParamWare *j } attrBzq := &jdshopapi.CreateSkuParamAttrs{ AttrID: utils.Int2Str(attrIDs["保质期"]), - AttrValues: []string{"5天"}, + AttrValues: []string{"5"}, } attrsProp = append(attrsProp, attrZctj) attrsProp = append(attrsProp, attrJhl)