From b9c5369fb39368ee13901320170a8db665780571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 20 Aug 2020 08:56:55 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=B8=8D=E8=83=BD=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=B9=B3=E5=8F=B0=E9=97=A8=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 659d9e8d2..ff91ee17b 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1186,6 +1186,10 @@ 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 c6a73051e16167dbda161e5074cd5f1117393a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 20 Aug 2020 14:28:46 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=BE=8E=E5=9B=A2=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E8=B4=B9=E5=9C=A8sku=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/mtwm/store_sku2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/partner/purchase/mtwm/store_sku2.go b/business/partner/purchase/mtwm/store_sku2.go index 92b96642a..31aa51c5a 100644 --- a/business/partner/purchase/mtwm/store_sku2.go +++ b/business/partner/purchase/mtwm/store_sku2.go @@ -267,8 +267,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI foodData["min_order_count"] = 1 } foodData["unit"] = storeSku.Unit - foodData["ladder_box_num"] = storeSku.LadderBoxNum - foodData["ladder_box_price"] = jxutils.IntPrice2Standard(int64(storeSku.LadderBoxPrice)) attr := switchAttr(storeSku.VendorVendorCatID) if attr != "" { foodData["common_attr_value"] = attr @@ -310,6 +308,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI if storeSku.Upc != "" { skus[0]["upc"] = storeSku.Upc } + skus[0]["ladder_box_num"] = storeSku.LadderBoxNum + skus[0]["ladder_box_price"] = jxutils.IntPrice2Standard(int64(storeSku.LadderBoxPrice)) if foodData["tag_id"] != nil { skus[0]["weight"] = storeSku.Weight // weight字段仅限服饰鞋帽、美妆、日用品、母婴、生鲜果蔬、生活超市下的便利店/超市门店品类的商家使用 } From c127dda6ccfac645650e92f7efbc1fb01d1cb48e 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, 21 Aug 2020 09:35:14 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=94=B9=E4=BB=B7=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 38d755be4..7273ffd02 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -4644,18 +4644,21 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto // return false, err // } if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini { - if len(storeAudits) > 0 { - storeAudits[0].DeletedAt = time.Now() - dao.UpdateEntity(db, storeAudits[0], "DeletedAt") - // if globals.IsProductEnv() { - // skuAndNames, err := dao.GetSkus(db, nil, []int{skuBindInfo.NameID}, nil, nil, nil) - // if len(skuAndNames) > 0 && err == nil { - // weixinmsg.NotifyStoreOpRequestStatus(true, storeID, skuBindInfo.NameID, jxutils.ComposeSpuName(skuAndNames[0].Prefix, skuAndNames[0].Name, 0), storeAudits[0].OriginUnitPrice, skuBindInfo.UnitPrice, "") - // } - // } + authInfo, err := ctx.GetV2AuthInfo() + if err == nil && authInfo != nil { + if len(storeAudits) > 0 { + storeAudits[0].DeletedAt = time.Now() + dao.UpdateEntity(db, storeAudits[0], "DeletedAt") + // if globals.IsProductEnv() { + // skuAndNames, err := dao.GetSkus(db, nil, []int{skuBindInfo.NameID}, nil, nil, nil) + // if len(skuAndNames) > 0 && err == nil { + // weixinmsg.NotifyStoreOpRequestStatus(true, storeID, skuBindInfo.NameID, jxutils.ComposeSpuName(skuAndNames[0].Prefix, skuAndNames[0].Name, 0), storeAudits[0].OriginUnitPrice, skuBindInfo.UnitPrice, "") + // } + // } + } + globals.SugarLogger.Debugf("doStoreSkuAudit return3 storeID : %v nameID: %v", storeID, skuBindInfo.NameID) + return false, err } - globals.SugarLogger.Debugf("doStoreSkuAudit return3 storeID : %v nameID: %v", storeID, skuBindInfo.NameID) - return false, err } storeSkuAudit := &model.StoreSkuAudit{ StoreID: storeID, 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 4/6] =?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 5/6] =?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 6/6] =?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)