From ae4deb9a044d7f6de6fe1af1d3609bf87b1da8dc 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, 9 Jul 2020 10:18:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?UPDATEstoresskuswithoutsync=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=BB=99storedetail=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index a5678159a..a94e7a3c6 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -1034,9 +1034,8 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs for _, storeID := range storeIDs { // todo 可以考虑在需要更新价格再获取 storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDJX) - if err != nil { - dao.Rollback(db) - return nil, err + if err != nil || storeDetail == nil { + continue } scaleFactor := float64(1) if isScale { From 889f05214c819eeda91d0d00d1d4f57f5117d746 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, 9 Jul 2020 16:00:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=BD=AC=E7=A7=BB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 89c3637b5..6efdb0ed0 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1283,7 +1283,13 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) return "", fmt.Errorf("未查询到该门店对应的平台信息!门店:[%v]", order.StoreID) } if len(order.VendorOrderID) > 12 { - suffix := utils.Str2Int(order.VendorOrderID[12:len(order.VendorOrderID)]) + var goodsOrders []*model.GoodsOrder + sql := ` + SELECT * FROM goods_order WHERE vendor_order_id2 = ? ORDER BY vendor_order_id DESC + ` + sqlParams := []interface{}{order.VendorOrderID2} + err = dao.GetRows(db, &goodsOrders, sql, sqlParams) + suffix := utils.Str2Int(goodsOrders[0].VendorOrderID[12:len(goodsOrders[0].VendorOrderID)]) suffix++ order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100000) + utils.Int2Str(suffix) }