- 重构partner_store_sku
This commit is contained in:
@@ -2065,25 +2065,25 @@ func RefreshStoresSkuByVendor(ctx *jxcontext.Context, storeIDs []int, vendorID i
|
|||||||
return hint, err
|
return hint, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetVendorStoreSkusInfo(ctx *jxcontext.Context, storeID int, vendorIDs, skuIDs []int, isContinueWhenError bool) (skuVendorMap map[int][]*partner.BareStoreSkuInfo, err error) {
|
func GetVendorStoreSkusInfo(ctx *jxcontext.Context, storeID int, vendorIDs, skuIDs []int, isContinueWhenError bool) (skuVendorMap map[int][]*partner.StoreSkuInfo, err error) {
|
||||||
globals.SugarLogger.Debugf("GetVendorStoreSkusInfo, storeID:%d, vendorIDs:%v, skuID:%v", storeID, vendorIDs, skuIDs)
|
globals.SugarLogger.Debugf("GetVendorStoreSkusInfo, storeID:%d, vendorIDs:%v, skuID:%v", storeID, vendorIDs, skuIDs)
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
var locker sync.RWMutex
|
var locker sync.RWMutex
|
||||||
skuVendorMap = make(map[int][]*partner.BareStoreSkuInfo)
|
skuVendorMap = make(map[int][]*partner.StoreSkuInfo)
|
||||||
_, err = CurVendorSync.LoopStoresMap(ctx, db, fmt.Sprintf("GetVendorStoreSkusInfo storeID:%d", storeID), false, false, vendorIDs, []int{storeID},
|
_, err = CurVendorSync.LoopStoresMap(ctx, db, fmt.Sprintf("GetVendorStoreSkusInfo storeID:%d", storeID), false, false, vendorIDs, []int{storeID},
|
||||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||||
if handler, _ := partner.GetPurchasePlatformFromVendorID(loopMapInfo.VendorID).(partner.IPurchasePlatformStoreSkuHandler); handler != nil {
|
if handler, _ := partner.GetPurchasePlatformFromVendorID(loopMapInfo.VendorID).(partner.IPurchasePlatformStoreSkuHandler); handler != nil {
|
||||||
storeSkuList, err2 := dao.GetStoreSkus2(db, loopMapInfo.VendorID, storeID, skuIDs, false)
|
storeSkuList, err2 := dao.GetStoreSkus2(db, loopMapInfo.VendorID, storeID, skuIDs, false)
|
||||||
if err = err2; err == nil && len(storeSkuList) > 0 {
|
if err = err2; err == nil && len(storeSkuList) > 0 {
|
||||||
bareStoreSkuInfoList := make([]*partner.BareStoreSkuInfo, len(skuIDs))
|
bareStoreSkuInfoList := make([]*partner.StoreSkuInfo, len(skuIDs))
|
||||||
for k, v := range storeSkuList {
|
for k, v := range storeSkuList {
|
||||||
bareStoreSkuInfoList[k] = &partner.BareStoreSkuInfo{
|
bareStoreSkuInfoList[k] = &partner.StoreSkuInfo{
|
||||||
SkuID: v.SkuID,
|
SkuID: v.SkuID,
|
||||||
VendorSkuID: v.VendorSkuID,
|
VendorSkuID: v.VendorSkuID,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outBareStoreSkuInfoList, err2 := handler.GetStoreSkusInfo(ctx, t, loopMapInfo.StoreMapList[0].StoreID, loopMapInfo.StoreMapList[0].VendorStoreID, bareStoreSkuInfoList)
|
outBareStoreSkuInfoList, err2 := handler.GetStoreSkusBareInfo(ctx, t, loopMapInfo.StoreMapList[0].StoreID, loopMapInfo.StoreMapList[0].VendorStoreID, bareStoreSkuInfoList)
|
||||||
if err = err2; err == nil && outBareStoreSkuInfoList != nil {
|
if err = err2; err == nil && outBareStoreSkuInfoList != nil {
|
||||||
locker.Lock()
|
locker.Lock()
|
||||||
defer locker.Unlock()
|
defer locker.Unlock()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ func SyncStoreSkuNew(ctx *jxcontext.Context, vendorIDs, storeIDs, nameIDs, skuID
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DeleteStoreAllSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, handler partner.ISingleStoreStoreSkuHandler, storeID int, vendorStoreID string, isContinueWhenError bool) (err error) {
|
func DeleteStoreAllSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, handler partner.ISingleStoreStoreSkuHandler, storeID int, vendorStoreID string, isContinueWhenError bool) (err error) {
|
||||||
skuNameList, err := handler.GetStoreAllSkus(ctx, storeID, vendorStoreID)
|
skuNameList, err := handler.GetStoreSkusFullInfo(ctx, parentTask, storeID, vendorStoreID, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -22,10 +22,10 @@ func DeleteStoreAllSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, handle
|
|||||||
task := tasksch.NewParallelTask(fmt.Sprintf("DeleteStoreAllSkus, vendorStoreID:%s", vendorStoreID),
|
task := tasksch.NewParallelTask(fmt.Sprintf("DeleteStoreAllSkus, vendorStoreID:%s", vendorStoreID),
|
||||||
tasksch.NewParallelConfig().SetBatchSize(batchSize).SetIsContinueWhenError(isContinueWhenError), ctx,
|
tasksch.NewParallelConfig().SetBatchSize(batchSize).SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
var skuList []*partner.BareStoreSkuInfo
|
var skuList []*partner.StoreSkuInfo
|
||||||
for _, v := range batchItemList {
|
for _, v := range batchItemList {
|
||||||
skuName := v.(*partner.SkuNameInfo)
|
skuName := v.(*partner.SkuNameInfo)
|
||||||
skuList = append(skuList, &partner.BareStoreSkuInfo{
|
skuList = append(skuList, &partner.StoreSkuInfo{
|
||||||
VendorSkuID: skuName.SkuList[0].VendorSkuID,
|
VendorSkuID: skuName.SkuList[0].VendorSkuID,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FuncUpdateStoreSkusStock = 1
|
FuncGetStoreSkusBareInfo = 1
|
||||||
FuncUpdateStoreSkusStatus = 2
|
FuncUpdateStoreSkusStock = 2
|
||||||
FuncUpdateStoreSkusPrice = 3
|
FuncUpdateStoreSkusStatus = 3
|
||||||
|
FuncUpdateStoreSkusPrice = 4
|
||||||
|
|
||||||
FuncCreateStoreSkus = 6
|
FuncGetStoreSkusFullInfo = 6
|
||||||
FuncUpdateStoreSkus = 7
|
FuncCreateStoreSkus = 7
|
||||||
FuncDeleteStoreSkus = 8
|
FuncUpdateStoreSkus = 8
|
||||||
|
FuncDeleteStoreSkus = 9
|
||||||
)
|
)
|
||||||
|
|
||||||
type BareStoreSkuInfo struct {
|
type StoreSkuInfo struct {
|
||||||
SkuID int `json:"skuID,omitempty"`
|
SkuID int `json:"skuID,omitempty"`
|
||||||
VendorSkuID string `json:"vendorSkuID,omitempty"`
|
VendorSkuID string `json:"vendorSkuID,omitempty"`
|
||||||
NameID int `json:"nameID,omitempty"`
|
NameID int `json:"nameID,omitempty"`
|
||||||
@@ -28,8 +30,8 @@ type BareStoreSkuInfo struct {
|
|||||||
Status int `json:"status,omitempty"`
|
Status int `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FullSkuInfo struct {
|
type SkuInfo struct {
|
||||||
BareStoreSkuInfo
|
StoreSkuInfo
|
||||||
SkuName string
|
SkuName string
|
||||||
Comment string
|
Comment string
|
||||||
SpecQuality float64
|
SpecQuality float64
|
||||||
@@ -49,10 +51,10 @@ type SkuNameInfo struct {
|
|||||||
VendorCatIDList []string
|
VendorCatIDList []string
|
||||||
PictureList []string
|
PictureList []string
|
||||||
Status int `json:"status,omitempty"`
|
Status int `json:"status,omitempty"`
|
||||||
SkuList []*FullSkuInfo
|
SkuList []*SkuInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
type BareStoreSkuInfoList []*BareStoreSkuInfo
|
type BareStoreSkuInfoList []*StoreSkuInfo
|
||||||
|
|
||||||
func (l BareStoreSkuInfoList) GetVendorSkuIDList() (vendorSkuIDList []string) {
|
func (l BareStoreSkuInfoList) GetVendorSkuIDList() (vendorSkuIDList []string) {
|
||||||
for _, v := range l {
|
for _, v := range l {
|
||||||
@@ -93,23 +95,35 @@ type BareCategoryInfo struct {
|
|||||||
type IPurchasePlatformStoreSkuHandler interface {
|
type IPurchasePlatformStoreSkuHandler interface {
|
||||||
GetStoreSkusBatchSize(funcID int) int
|
GetStoreSkusBatchSize(funcID int) int
|
||||||
|
|
||||||
GetStoreSkusInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*BareStoreSkuInfo) (outStoreSkuList []*BareStoreSkuInfo, err error)
|
GetStoreSkusBareInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*StoreSkuInfo) (outStoreSkuList []*StoreSkuInfo, err error)
|
||||||
UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error)
|
UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*StoreSkuInfo) (err error)
|
||||||
UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error)
|
UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*StoreSkuInfo) (err error)
|
||||||
UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error)
|
UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*StoreSkuInfo) (err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ISingleStoreStoreSkuHandler interface {
|
type ISingleStoreStoreSkuHandler interface {
|
||||||
IPurchasePlatformStoreSkuHandler
|
IPurchasePlatformStoreSkuHandler
|
||||||
|
|
||||||
// 这个函数与GetStoreSkusInfo的区别是GetStoreAllSkus取的是全信息,而GetStoreSkusInfo只含库存,价格与可售信息
|
GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, skuIDs []int) (outSkuNameList []*SkuNameInfo, err error)
|
||||||
GetStoreAllSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (skuNameList []*SkuNameInfo, err error)
|
|
||||||
CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (err error)
|
CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (err error)
|
||||||
UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (err error)
|
UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (err error)
|
||||||
DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error)
|
DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*StoreSkuInfo) (err error)
|
||||||
|
|
||||||
GetStoreAllCategories(ctx *jxcontext.Context, storeID int, vendorStoreID string) (cats []*BareCategoryInfo, err error)
|
GetStoreAllCategories(ctx *jxcontext.Context, storeID int, vendorStoreID string) (cats []*BareCategoryInfo, err error)
|
||||||
CreateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error)
|
CreateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error)
|
||||||
UpdateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error)
|
UpdateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error)
|
||||||
DeleteStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID, vendorCatID string) (err error)
|
DeleteStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID, vendorCatID string) (err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BuildSkuName(skuID int, vendorSkuID string) (skuName *SkuNameInfo) {
|
||||||
|
return &SkuNameInfo{
|
||||||
|
SkuList: []*SkuInfo{
|
||||||
|
&SkuInfo{
|
||||||
|
StoreSkuInfo: StoreSkuInfo{
|
||||||
|
SkuID: skuID,
|
||||||
|
VendorSkuID: vendorSkuID,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,8 +20,12 @@ func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
|
|||||||
switch funcID {
|
switch funcID {
|
||||||
case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice, partner.FuncDeleteStoreSkus:
|
case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice, partner.FuncDeleteStoreSkus:
|
||||||
batchSize = ebaiapi.MaxStoreSkuBatchSize
|
batchSize = ebaiapi.MaxStoreSkuBatchSize
|
||||||
|
case partner.FuncGetStoreSkusBareInfo:
|
||||||
|
batchSize = 1
|
||||||
case partner.FuncCreateStoreSkus, partner.FuncUpdateStoreSkus:
|
case partner.FuncCreateStoreSkus, partner.FuncUpdateStoreSkus:
|
||||||
batchSize = 1
|
batchSize = 1
|
||||||
|
case partner.FuncGetStoreSkusFullInfo:
|
||||||
|
batchSize = 1
|
||||||
}
|
}
|
||||||
return batchSize
|
return batchSize
|
||||||
}
|
}
|
||||||
@@ -98,14 +102,14 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
if globals.EnableEbaiStoreWrite {
|
if globals.EnableEbaiStoreWrite {
|
||||||
err = api.EbaiAPI.SkuDelete(utils.Int2Str(storeID), strings.Join(partner.BareStoreSkuInfoList(storeSkuList).GetVendorSkuIDList(), ","))
|
err = api.EbaiAPI.SkuDelete(utils.Int2Str(storeID), strings.Join(partner.BareStoreSkuInfoList(storeSkuList).GetVendorSkuIDList(), ","))
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var validSkus, invalidSkus []string
|
var validSkus, invalidSkus []string
|
||||||
for _, storeSku := range storeSkuList {
|
for _, storeSku := range storeSkuList {
|
||||||
if storeSku.Status == model.SkuStatusNormal {
|
if storeSku.Status == model.SkuStatusNormal {
|
||||||
@@ -131,7 +135,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
skuPriceList := make([]string, len(storeSkuList))
|
skuPriceList := make([]string, len(storeSkuList))
|
||||||
for k, v := range storeSkuList {
|
for k, v := range storeSkuList {
|
||||||
skuPriceList[k] = fmt.Sprintf("%s:%d", v.VendorSkuID, v.Price)
|
skuPriceList[k] = fmt.Sprintf("%s:%d", v.VendorSkuID, v.Price)
|
||||||
@@ -146,7 +150,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID i
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
skuStockList := make([]string, len(storeSkuList))
|
skuStockList := make([]string, len(storeSkuList))
|
||||||
for k, v := range storeSkuList {
|
for k, v := range storeSkuList {
|
||||||
skuStockList[k] = fmt.Sprintf("%s:%d", v.VendorSkuID, v.Stock)
|
skuStockList[k] = fmt.Sprintf("%s:%d", v.VendorSkuID, v.Stock)
|
||||||
@@ -195,7 +199,7 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo) (params map[s
|
|||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.BareStoreSkuInfo) (outStoreSkuList []*partner.BareStoreSkuInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusBareInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.StoreSkuInfo) (outStoreSkuList []*partner.StoreSkuInfo, err error) {
|
||||||
vendorSkuIDIntList := partner.BareStoreSkuInfoList(inStoreSkuList).GetVendorSkuIDIntList()
|
vendorSkuIDIntList := partner.BareStoreSkuInfoList(inStoreSkuList).GetVendorSkuIDIntList()
|
||||||
var vendorSkuList []*ebaiapi.SkuInfo
|
var vendorSkuList []*ebaiapi.SkuInfo
|
||||||
if len(vendorSkuIDIntList) > 1 {
|
if len(vendorSkuIDIntList) > 1 {
|
||||||
@@ -224,7 +228,7 @@ func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask ta
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
storeSkuMap := make(map[int64]*partner.BareStoreSkuInfo)
|
storeSkuMap := make(map[int64]*partner.StoreSkuInfo)
|
||||||
for _, v := range inStoreSkuList {
|
for _, v := range inStoreSkuList {
|
||||||
storeSkuMap[utils.Str2Int64(v.VendorSkuID)] = v
|
storeSkuMap[utils.Str2Int64(v.VendorSkuID)] = v
|
||||||
}
|
}
|
||||||
@@ -252,10 +256,14 @@ func ebaiSkuStatus2Jx(ebaiSkuStatus int) (jxSkuStatus int) {
|
|||||||
return jxSkuStatus
|
return jxSkuStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreAllSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (skuNameList []*partner.SkuNameInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, skuIDs []int) (skuNameList []*partner.SkuNameInfo, err error) {
|
||||||
page1, err := api.EbaiAPI.SkuList(utils.Int2Str(storeID), &ebaiapi.SkuListParams{
|
params := &ebaiapi.SkuListParams{
|
||||||
PageSize: MaxPageSize,
|
PageSize: MaxPageSize,
|
||||||
})
|
}
|
||||||
|
if len(skuIDs) == 1 {
|
||||||
|
params.CustomSkuID = utils.Int2Str(skuIDs[0])
|
||||||
|
}
|
||||||
|
page1, err := api.EbaiAPI.SkuList(utils.Int2Str(storeID), params)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
skuNameList = append(skuNameList, vendorSkuList2Jx(page1.List)...)
|
skuNameList = append(skuNameList, vendorSkuList2Jx(page1.List)...)
|
||||||
if page1.Pages > 1 {
|
if page1.Pages > 1 {
|
||||||
@@ -275,7 +283,7 @@ func (p *PurchaseHandler) GetStoreAllSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
}
|
}
|
||||||
return nil, err2
|
return nil, err2
|
||||||
}, pages)
|
}, pages)
|
||||||
tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, parentTask, true).Run()
|
||||||
result, err2 := task.GetResult(0)
|
result, err2 := task.GetResult(0)
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
for _, v := range result {
|
for _, v := range result {
|
||||||
@@ -297,9 +305,9 @@ func vendorSku2Jx(vendorSku *ebaiapi.SkuInfo) (skuName *partner.SkuNameInfo) {
|
|||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
Name: name,
|
Name: name,
|
||||||
Unit: unit,
|
Unit: unit,
|
||||||
SkuList: []*partner.FullSkuInfo{
|
SkuList: []*partner.SkuInfo{
|
||||||
&partner.FullSkuInfo{
|
&partner.SkuInfo{
|
||||||
BareStoreSkuInfo: partner.BareStoreSkuInfo{
|
StoreSkuInfo: partner.StoreSkuInfo{
|
||||||
VendorSkuID: utils.Int64ToStr(vendorSku.SkuID),
|
VendorSkuID: utils.Int64ToStr(vendorSku.SkuID),
|
||||||
SkuID: int(utils.Str2Int64WithDefault(vendorSku.CustomSkuID, 0)),
|
SkuID: int(utils.Str2Int64WithDefault(vendorSku.CustomSkuID, 0)),
|
||||||
|
|
||||||
@@ -318,7 +326,7 @@ func vendorSku2Jx(vendorSku *ebaiapi.SkuInfo) (skuName *partner.SkuNameInfo) {
|
|||||||
for _, v := range vendorSku.Photos {
|
for _, v := range vendorSku.Photos {
|
||||||
skuName.PictureList = append(skuName.PictureList, v.URL)
|
skuName.PictureList = append(skuName.PictureList, v.URL)
|
||||||
}
|
}
|
||||||
// todo, 看起来饿百只返回了最底层的商家分类信息
|
// todo, 看起来饿百只返回了最低一级的商家分类信息
|
||||||
for _, v := range vendorSku.CustomCatList {
|
for _, v := range vendorSku.CustomCatList {
|
||||||
skuName.VendorCatIDList = append(skuName.VendorCatIDList, v.CustomCatID)
|
skuName.VendorCatIDList = append(skuName.VendorCatIDList, v.CustomCatID)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetStoreAllSkus(t *testing.T) {
|
func TestGetStoreAllSkus(t *testing.T) {
|
||||||
skuNameList, err := new(PurchaseHandler).GetStoreAllSkus(jxcontext.AdminCtx, testShopID, testShopBaiduID)
|
skuNameList, err := new(PurchaseHandler).GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, []int{4256})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err.Error())
|
t.Fatal(err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import (
|
|||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
|
func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
|
||||||
switch funcID {
|
switch funcID {
|
||||||
case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice:
|
case partner.FuncGetStoreSkusBareInfo, partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice:
|
||||||
batchSize = jdapi.MaxStoreSkuBatchSize
|
batchSize = jdapi.MaxStoreSkuBatchSize
|
||||||
}
|
}
|
||||||
return batchSize
|
return batchSize
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.BareStoreSkuInfo) (outStoreSkuList []*partner.BareStoreSkuInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusBareInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.StoreSkuInfo) (outStoreSkuList []*partner.StoreSkuInfo, err error) {
|
||||||
var batchSkuInfoList []*jdapi.BaseStockCenterRequest
|
var batchSkuInfoList []*jdapi.BaseStockCenterRequest
|
||||||
batchSkuList := partner.BareStoreSkuInfoList(inStoreSkuList).GetVendorSkuIDIntList()
|
batchSkuList := partner.BareStoreSkuInfoList(inStoreSkuList).GetVendorSkuIDIntList()
|
||||||
for _, v := range inStoreSkuList {
|
for _, v := range inStoreSkuList {
|
||||||
@@ -48,7 +48,7 @@ func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask ta
|
|||||||
tasksch.HandleTask(task, parentTask, false).Run()
|
tasksch.HandleTask(task, parentTask, false).Run()
|
||||||
_, err = task.GetResult(0)
|
_, err = task.GetResult(0)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
storeSkuMap := make(map[int64]*partner.BareStoreSkuInfo)
|
storeSkuMap := make(map[int64]*partner.StoreSkuInfo)
|
||||||
for _, v := range inStoreSkuList {
|
for _, v := range inStoreSkuList {
|
||||||
storeSkuMap[utils.Str2Int64(v.VendorSkuID)] = v
|
storeSkuMap[utils.Str2Int64(v.VendorSkuID)] = v
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ func jxStoreSkuStatus2Jd(jxStoreSkuStatus int) (isSale bool) {
|
|||||||
return jxStoreSkuStatus == model.SkuStatusNormal
|
return jxStoreSkuStatus == model.SkuStatusNormal
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var skuVendibilityList []*jdapi.StockVendibility
|
var skuVendibilityList []*jdapi.StockVendibility
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
skuVendibilityList = append(skuVendibilityList, &jdapi.StockVendibility{
|
skuVendibilityList = append(skuVendibilityList, &jdapi.StockVendibility{
|
||||||
@@ -91,7 +91,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var skuPriceInfoList []*jdapi.SkuPriceInfo
|
var skuPriceInfoList []*jdapi.SkuPriceInfo
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
skuPriceInfoList = append(skuPriceInfoList, &jdapi.SkuPriceInfo{
|
skuPriceInfoList = append(skuPriceInfoList, &jdapi.SkuPriceInfo{
|
||||||
@@ -105,7 +105,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID i
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var skuStockList []*jdapi.SkuStock
|
var skuStockList []*jdapi.SkuStock
|
||||||
for _, v := range storeSkuList {
|
for _, v := range storeSkuList {
|
||||||
skuStockList = append(skuStockList, &jdapi.SkuStock{
|
skuStockList = append(skuStockList, &jdapi.SkuStock{
|
||||||
|
|||||||
@@ -17,10 +17,14 @@ func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
|
|||||||
switch funcID {
|
switch funcID {
|
||||||
case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice:
|
case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice:
|
||||||
batchSize = mtwmapi.MaxStoreSkuBatchSize
|
batchSize = mtwmapi.MaxStoreSkuBatchSize
|
||||||
|
case partner.FuncGetStoreSkusBareInfo:
|
||||||
|
batchSize = 1
|
||||||
case partner.FuncDeleteStoreSkus:
|
case partner.FuncDeleteStoreSkus:
|
||||||
batchSize = 1 // 可考虑用批量操作
|
batchSize = 1 // 可考虑用批量操作
|
||||||
case partner.FuncCreateStoreSkus, partner.FuncUpdateStoreSkus:
|
case partner.FuncCreateStoreSkus, partner.FuncUpdateStoreSkus:
|
||||||
batchSize = 1 // 可考虑用批量操作
|
batchSize = 1 // 可考虑用批量操作
|
||||||
|
case partner.FuncGetStoreSkusFullInfo:
|
||||||
|
batchSize = 1
|
||||||
}
|
}
|
||||||
return batchSize
|
return batchSize
|
||||||
}
|
}
|
||||||
@@ -151,7 +155,7 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
if globals.EnableMtwmStoreWrite {
|
if globals.EnableMtwmStoreWrite {
|
||||||
if len(storeSkuList) == 1 {
|
if len(storeSkuList) == 1 {
|
||||||
err = api.MtwmAPI.RetailDelete(vendorStoreID, storeSkuList[0].VendorSkuID)
|
err = api.MtwmAPI.RetailDelete(vendorStoreID, storeSkuList[0].VendorSkuID)
|
||||||
@@ -165,7 +169,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var validSkus, invalidSkus []*mtwmapi.BareStoreFoodInfo
|
var validSkus, invalidSkus []*mtwmapi.BareStoreFoodInfo
|
||||||
for _, storeSku := range storeSkuList {
|
for _, storeSku := range storeSkuList {
|
||||||
skuInfo := &mtwmapi.BareStoreFoodInfo{
|
skuInfo := &mtwmapi.BareStoreFoodInfo{
|
||||||
@@ -193,7 +197,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var priceList []*mtwmapi.BareStoreFoodInfo
|
var priceList []*mtwmapi.BareStoreFoodInfo
|
||||||
for _, storeSku := range storeSkuList {
|
for _, storeSku := range storeSkuList {
|
||||||
skuInfo := &mtwmapi.BareStoreFoodInfo{
|
skuInfo := &mtwmapi.BareStoreFoodInfo{
|
||||||
@@ -213,7 +217,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID i
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var stockList []*mtwmapi.BareStoreFoodInfo
|
var stockList []*mtwmapi.BareStoreFoodInfo
|
||||||
for _, storeSku := range storeSkuList {
|
for _, storeSku := range storeSkuList {
|
||||||
skuInfo := &mtwmapi.BareStoreFoodInfo{
|
skuInfo := &mtwmapi.BareStoreFoodInfo{
|
||||||
@@ -233,7 +237,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID i
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.BareStoreSkuInfo) (outStoreSkuList []*partner.BareStoreSkuInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusBareInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.StoreSkuInfo) (outStoreSkuList []*partner.StoreSkuInfo, err error) {
|
||||||
vendorSkuIDList := partner.BareStoreSkuInfoList(inStoreSkuList).GetVendorSkuIDList()
|
vendorSkuIDList := partner.BareStoreSkuInfoList(inStoreSkuList).GetVendorSkuIDList()
|
||||||
var vendorFoodList []*mtwmapi.AppFood
|
var vendorFoodList []*mtwmapi.AppFood
|
||||||
if len(vendorSkuIDList) > 1 {
|
if len(vendorSkuIDList) > 1 {
|
||||||
@@ -258,7 +262,7 @@ func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask ta
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
storeSkuMap := make(map[string]*partner.BareStoreSkuInfo)
|
storeSkuMap := make(map[string]*partner.StoreSkuInfo)
|
||||||
for _, v := range inStoreSkuList {
|
for _, v := range inStoreSkuList {
|
||||||
storeSkuMap[v.VendorSkuID] = v
|
storeSkuMap[v.VendorSkuID] = v
|
||||||
}
|
}
|
||||||
@@ -283,16 +287,24 @@ func mtwmSkuStatus2Jx(mtwmSkuStatus int) (jxSkuStatus int) {
|
|||||||
return jxSkuStatus
|
return jxSkuStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreAllSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (skuNameList []*partner.SkuNameInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, skuIDs []int) (skuNameList []*partner.SkuNameInfo, err error) {
|
||||||
for {
|
if len(skuIDs) == 0 {
|
||||||
result, err := api.MtwmAPI.RetailList(vendorStoreID, len(skuNameList), mtwmapi.GeneralMaxLimit)
|
for {
|
||||||
|
result, err := api.MtwmAPI.RetailList(vendorStoreID, len(skuNameList), mtwmapi.GeneralMaxLimit)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
skuNameList = append(skuNameList, vendorSkuList2Jx(result)...)
|
||||||
|
if len(result) < mtwmapi.GeneralMaxLimit {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
skuInfo, err := api.MtwmAPI.RetailGet(vendorStoreID, utils.Int2Str(skuIDs[0]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
skuNameList = append(skuNameList, vendorSkuList2Jx(result)...)
|
skuNameList = append(skuNameList, vendorSku2Jx(skuInfo))
|
||||||
if len(result) < mtwmapi.GeneralMaxLimit {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return skuNameList, err
|
return skuNameList, err
|
||||||
}
|
}
|
||||||
@@ -308,9 +320,9 @@ func vendorSku2Jx(vendorSku *mtwmapi.AppFood) (skuName *partner.SkuNameInfo) {
|
|||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
Name: name,
|
Name: name,
|
||||||
Unit: unit,
|
Unit: unit,
|
||||||
SkuList: []*partner.FullSkuInfo{
|
SkuList: []*partner.SkuInfo{
|
||||||
&partner.FullSkuInfo{
|
&partner.SkuInfo{
|
||||||
BareStoreSkuInfo: partner.BareStoreSkuInfo{
|
StoreSkuInfo: partner.StoreSkuInfo{
|
||||||
VendorSkuID: mtwmSku.SkuID,
|
VendorSkuID: mtwmSku.SkuID,
|
||||||
SkuID: int(utils.Str2Int64WithDefault(mtwmSku.SkuID, 0)),
|
SkuID: int(utils.Str2Int64WithDefault(mtwmSku.SkuID, 0)),
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetStoreAllSkus(t *testing.T) {
|
func TestGetStoreAllSkus(t *testing.T) {
|
||||||
skuNameList, err := new(PurchaseHandler).GetStoreAllSkus(jxcontext.AdminCtx, 2, "2523687")
|
skuNameList, err := new(PurchaseHandler).GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, vendorStoreID
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
storeSku := storeSkuList[0]
|
storeSku := storeSkuList[0]
|
||||||
goodsID := utils.Str2Int64(storeSku.VendorNameID)
|
goodsID := utils.Str2Int64(storeSku.VendorNameID)
|
||||||
if globals.EnableWscStoreWrite {
|
if globals.EnableWscStoreWrite {
|
||||||
@@ -162,7 +162,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
var validGoodsIDList, invalidGoodsIDList []int64
|
var validGoodsIDList, invalidGoodsIDList []int64
|
||||||
for _, storeSku := range storeSkuList {
|
for _, storeSku := range storeSkuList {
|
||||||
if storeSku.Status == model.SkuStatusNormal {
|
if storeSku.Status == model.SkuStatusNormal {
|
||||||
@@ -182,11 +182,11 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.BareStoreSkuInfo) (err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
|
||||||
err = fmt.Errorf("内部错误,微商城不支持UpdateStoreSkusPrice!")
|
err = fmt.Errorf("内部错误,微商城不支持UpdateStoreSkusPrice!")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.BareStoreSkuInfo) (outStoreSkuList []*partner.BareStoreSkuInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.StoreSkuInfo) (outStoreSkuList []*partner.StoreSkuInfo, err error) {
|
||||||
return outStoreSkuList, err
|
return outStoreSkuList, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user