From c75769495a94eed00606eaf7c87988f746baa79f Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 3 Dec 2019 15:54:33 +0800 Subject: [PATCH] remove some comment --- business/partner/partner.go | 4 -- business/partner/purchase/jd/store.go | 46 ---------------------- business/partner/purchase/jd/store_sku2.go | 14 ------- 3 files changed, 64 deletions(-) diff --git a/business/partner/partner.go b/business/partner/partner.go index 7327885f9..8af7d7564 100644 --- a/business/partner/partner.go +++ b/business/partner/partner.go @@ -146,10 +146,6 @@ type IPurchasePlatformHandler interface { GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error) UpdateStoreCustomID(ctx *jxcontext.Context, vendorStoreID string, storeID int64) (err error) - // SyncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, skuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) - // // !!!注意,此操作会先清除门店已有的商品,一般用于初始化,小心使用 - // FullSyncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, isAsync, isContinueWhenError bool) (hint string, err error) - RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) UploadImg(ctx *jxcontext.Context, imgURL string, imgData []byte, imgName string, imgType int) (imgHint string, err error) diff --git a/business/partner/purchase/jd/store.go b/business/partner/purchase/jd/store.go index 039fd747e..43c54fa2c 100644 --- a/business/partner/purchase/jd/store.go +++ b/business/partner/purchase/jd/store.go @@ -207,24 +207,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin return err } -/////////////////////// -func (p *PurchaseHandler) GetAllStoresFromRemote() ([]*model.Store, error) { - ids, err := p.GetAllStoresVendorID(jxcontext.AdminCtx) - if err == nil { - retVal := make([]*model.Store, len(ids)) - for index, id := range ids { - store, err2 := p.ReadStore(jxcontext.AdminCtx, id) - if err2 == nil { - retVal[index] = &store.Store - } else { - return nil, err2 - } - } - return retVal, nil - } - return nil, err -} - func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) { globals.SugarLogger.Debugf("jd RefreshAllStoresID") const stepCount = 3 @@ -274,34 +256,6 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask return rootTask.ID, err } -// func JdRange2JxRange(jdRanges string) (jxRanges string) { -// coords := strings.Split(jdRanges, ";") -// intCoords := []string{} -// for _, coord := range coords { -// items := strings.Split(coord, ",") -// if len(items) == 2 { -// lng := jxutils.StandardCoordinate2Int(utils.Str2Float64(items[0])) -// lat := jxutils.StandardCoordinate2Int(utils.Str2Float64(items[1])) -// intCoords = append(intCoords, fmt.Sprintf("%d,%d", lng, lat)) -// } -// } -// return strings.Join(intCoords, ";") -// } - -// func JxRange2JdRange(jxRanges string) (jdRanges string) { -// coords := strings.Split(jxRanges, ";") -// intCoords := []string{} -// for _, coord := range coords { -// items := strings.Split(coord, ",") -// if len(items) == 2 { -// lng := jxutils.IntCoordinate2Standard(int(utils.Str2Int64(items[0]))) -// lat := jxutils.IntCoordinate2Standard(int(utils.Str2Int64(items[1]))) -// intCoords = append(intCoords, fmt.Sprintf("%f,%f", lng, lat)) -// } -// } -// return strings.Join(intCoords, ";") -// } - func JdDeliveryType2Jx(deliveryType int) int8 { if deliveryType == jdapi.CarrierNoSelfDelivery { return scheduler.StoreDeliveryTypeByStore diff --git a/business/partner/purchase/jd/store_sku2.go b/business/partner/purchase/jd/store_sku2.go index f6b5a46d8..304e9af7b 100644 --- a/business/partner/purchase/jd/store_sku2.go +++ b/business/partner/purchase/jd/store_sku2.go @@ -211,17 +211,3 @@ func (p *PurchaseHandler) SyncStoreProducts(ctx *jxcontext.Context, parentTask t } return hint, err } - -// func (p *PurchaseHandler) ReorderStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, vendorCatID string, storeSkuList []*partner.StoreSkuInfo) (err error) { -// storeSkuCount := len(storeSkuList) -// if storeSkuCount > 0 { -// if storeSkuCount > jdapi.MaxAddByStoreAndSkusCount { -// storeSkuList = storeSkuList[:jdapi.MaxAddByStoreAndSkusCount] -// } -// vendorSkuIDs := partner.BareStoreSkuInfoList(storeSkuList).GetVendorSkuIDIntList() -// if globals.EnableJdStoreWrite { -// err = getAPI("").AddByStoreAndSkus(utils.Str2Int64(vendorStoreID), vendorSkuIDs) -// } -// } -// return err -// }