remove some comment
This commit is contained in:
@@ -146,10 +146,6 @@ type IPurchasePlatformHandler interface {
|
|||||||
GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error)
|
GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error)
|
||||||
UpdateStoreCustomID(ctx *jxcontext.Context, vendorStoreID string, storeID int64) (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)
|
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)
|
UploadImg(ctx *jxcontext.Context, imgURL string, imgData []byte, imgName string, imgType int) (imgHint string, err error)
|
||||||
|
|||||||
@@ -207,24 +207,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
return err
|
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) {
|
func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) {
|
||||||
globals.SugarLogger.Debugf("jd RefreshAllStoresID")
|
globals.SugarLogger.Debugf("jd RefreshAllStoresID")
|
||||||
const stepCount = 3
|
const stepCount = 3
|
||||||
@@ -274,34 +256,6 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask
|
|||||||
return rootTask.ID, err
|
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 {
|
func JdDeliveryType2Jx(deliveryType int) int8 {
|
||||||
if deliveryType == jdapi.CarrierNoSelfDelivery {
|
if deliveryType == jdapi.CarrierNoSelfDelivery {
|
||||||
return scheduler.StoreDeliveryTypeByStore
|
return scheduler.StoreDeliveryTypeByStore
|
||||||
|
|||||||
@@ -211,17 +211,3 @@ func (p *PurchaseHandler) SyncStoreProducts(ctx *jxcontext.Context, parentTask t
|
|||||||
}
|
}
|
||||||
return hint, err
|
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
|
|
||||||
// }
|
|
||||||
|
|||||||
Reference in New Issue
Block a user