From fb575d9b723173480a274fbf80b7fd35b31a703d Mon Sep 17 00:00:00 2001 From: gazebo Date: Sat, 5 Jan 2019 16:26:13 +0800 Subject: [PATCH] - ignore price == 0 data in Change2JDSPU4Store --- business/jxstore/initdata/initdata.go | 2 +- business/partner/purchase/ebai/store.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/business/jxstore/initdata/initdata.go b/business/jxstore/initdata/initdata.go index 2ab978d82..0cf0e1ec2 100644 --- a/business/jxstore/initdata/initdata.go +++ b/business/jxstore/initdata/initdata.go @@ -355,7 +355,7 @@ func Change2JDSPU4Store(ctx *jxcontext.Context, storeIDs []int, isAsync, isConti JOIN store t3 ON t3.id = t1.store_id JOIN sku_name t4 ON t4.id = t2.name_id LEFT JOIN sku_name_place_bind t5 ON t5.place_code = t3.city_code AND t5.name_id = t4.id - WHERE t1.deleted_at = ? AND (t4.is_global = 1 OR t5.id IS NOT NULL) + WHERE t1.deleted_at = ? AND (t4.is_global = 1 OR t5.id IS NOT NULL) AND t1.price > 0 ` sqlParams = []interface{}{ ctx.GetUserName(), diff --git a/business/partner/purchase/ebai/store.go b/business/partner/purchase/ebai/store.go index eb681a500..9e583cf82 100644 --- a/business/partner/purchase/ebai/store.go +++ b/business/partner/purchase/ebai/store.go @@ -187,6 +187,12 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin err = api.EbaiAPI.ShopClose("", utils.Str2Int64(store.VendorStoreID)) } if err != nil { + // todo + if intErr, ok := err.(*utils.ErrorWithCode); ok { + if intErr.IntCode() == 201101 { + err = nil + } + } return err } }