获取门店商品价格
This commit is contained in:
@@ -2551,28 +2551,23 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int,
|
||||
inStoreSkuList = append(inStoreSkuList, inStoreSku)
|
||||
outStoreSkuList, err := handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList)
|
||||
if err != nil {
|
||||
return retVal, err
|
||||
}
|
||||
if storeDetail != nil {
|
||||
if len(outStoreSkuList) > 0 {
|
||||
data := DataVendorStoreSkuPrice{
|
||||
StoreID: vendorStoreID,
|
||||
StoreName: storeDetail.Name,
|
||||
SkuID: skuID,
|
||||
SkuName: skuNameList[0].Name,
|
||||
VendorPrice: utils.Float64ToStr(utils.Str2Float64(utils.Int64ToStr(outStoreSkuList[0].VendorPrice)) / 100),
|
||||
}
|
||||
retVal = []DataVendorStoreSkuPrice{data}
|
||||
} else {
|
||||
data := DataVendorStoreSkuPrice{
|
||||
StoreID: vendorStoreID,
|
||||
StoreName: storeDetail.Name,
|
||||
SkuID: skuID,
|
||||
SkuName: skuNameList[0].Name,
|
||||
VendorPrice: "",
|
||||
}
|
||||
retVal = []DataVendorStoreSkuPrice{data}
|
||||
data := DataVendorStoreSkuPrice{
|
||||
StoreID: vendorStoreID,
|
||||
StoreName: storeDetail.Name,
|
||||
SkuID: skuID,
|
||||
SkuName: skuNameList[0].Name,
|
||||
VendorPrice: "",
|
||||
}
|
||||
retVal = []DataVendorStoreSkuPrice{data}
|
||||
} else {
|
||||
data := DataVendorStoreSkuPrice{
|
||||
StoreID: vendorStoreID,
|
||||
StoreName: storeDetail.Name,
|
||||
SkuID: skuID,
|
||||
SkuName: skuNameList[0].Name,
|
||||
VendorPrice: utils.Float64ToStr(utils.Str2Float64(utils.Int64ToStr(outStoreSkuList[0].VendorPrice)) / 100),
|
||||
}
|
||||
retVal = []DataVendorStoreSkuPrice{data}
|
||||
}
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTas
|
||||
params.SkuID = utils.Str2Int64WithDefault(storeSkuList[0].VendorSkuID, 0)
|
||||
}
|
||||
}
|
||||
page1, err := api.EbaiAPI.SkuList(utils.Int2Str(storeID), params)
|
||||
page1, err := api.EbaiAPI.SkuList(vendorStoreID, params)
|
||||
if err == nil {
|
||||
skuNameList = append(skuNameList, vendorSkuList2Jx(page1.List)...)
|
||||
if page1.Pages > 1 {
|
||||
@@ -334,7 +334,7 @@ func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTas
|
||||
PageSize: ebaiapi.MaxSkuListPageSize,
|
||||
Page: batchItemList[0].(int),
|
||||
}
|
||||
pageSku, err2 := api.EbaiAPI.SkuList(utils.Int2Str(storeID), callParams)
|
||||
pageSku, err2 := api.EbaiAPI.SkuList(vendorStoreID, callParams)
|
||||
if err2 == nil {
|
||||
return pageSku.List, err2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user