1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package jdapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
@@ -334,12 +335,63 @@ func (a *API) DelVipPrice(outStationNo string, skuIds []*SkuIdEntity) (err error
|
||||
}
|
||||
|
||||
// AuerySkuInfoList 查询已经上传的商品列表
|
||||
func (a *API) AuerySkuInfoList(pageNo, pageSize int64) error {
|
||||
func (a *API) AuerySkuInfoList(pageNo, pageSize int64) ([]string, error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"pageNo": pageNo,
|
||||
"pageSize": pageSize,
|
||||
}
|
||||
data, err := a.AccessAPINoPage("pms/querySkuInfoList", jdParams, nil, nil, genNoPageResultParser("code", "msg", "", "0"))
|
||||
fmt.Println(data)
|
||||
return err
|
||||
data, err := a.AccessAPINoPage("pms/querySkuInfoList", jdParams, nil, nil, genNoPageResultParser("code", "msg", "result", "0"))
|
||||
skuList := data.(map[string]interface{})["result"]
|
||||
|
||||
sku := make([]*JDSkuList, 0, 0)
|
||||
json.Unmarshal([]byte(skuList.(string)), &sku)
|
||||
|
||||
skuId := make([]string, 0, 0)
|
||||
for _, list := range sku {
|
||||
if list.OutSkuId != "" {
|
||||
skuId = append(skuId, list.OutSkuId)
|
||||
}
|
||||
}
|
||||
return skuId, err
|
||||
}
|
||||
|
||||
type JDSkuList struct {
|
||||
SkuId int64 `json:"skuId"`
|
||||
OutSkuId string `json:"outSkuId"`
|
||||
OrgCode int `json:"orgCode"`
|
||||
CategoryId int `json:"categoryId"`
|
||||
BrandId int `json:"brandId"`
|
||||
SkuName string `json:"skuName"`
|
||||
Slogan string `json:"slogan"`
|
||||
SkuPrice int `json:"skuPrice"`
|
||||
StockNum int `json:"stockNum"`
|
||||
Weight float64 `json:"weight"`
|
||||
ProductLocation string `json:"productLocation"`
|
||||
Producter string `json:"producter"`
|
||||
UpcCode string `json:"upcCode"`
|
||||
FixedUpTime string `json:"fixedUpTime,omitempty"`
|
||||
FixedDownTime string `json:"fixedDownTime"`
|
||||
FixedStatus int `json:"fixedStatus"`
|
||||
ShopCategories []int `json:"shopCategories"`
|
||||
PriceUnit string `json:"priceUnit"`
|
||||
PrefixKey string `json:"prefixKey"`
|
||||
SuffixKey string `json:"suffixKey"`
|
||||
IsBreakable int `json:"isBreakable,omitempty"`
|
||||
LiquidStatue string `json:"liquidStatue,omitempty"`
|
||||
Prescripition string `json:"prescripition,omitempty"`
|
||||
HighSingularValue string `json:"highSingularValue,omitempty"`
|
||||
BusinessMark []interface{} `json:"businessMark,omitempty"`
|
||||
SellCities []int `json:"sellCities"`
|
||||
PackageFee float64 `json:"packageFee"`
|
||||
SuperName string `json:"superName"`
|
||||
SaleAttrValueId string `json:"saleAttrValueId"`
|
||||
SaleAttrValueName string `json:"saleAttrValueName"`
|
||||
SloganStartTime string `json:"sloganStartTime,omitempty"`
|
||||
SloganEndTime string `json:"sloganEndTime,omitempty"`
|
||||
Length int `json:"length,omitempty"`
|
||||
Wide int `json:"wide,omitempty"`
|
||||
High int `json:"high,omitempty"`
|
||||
TransportAttribute string `json:"transportAttribute,omitempty"`
|
||||
FixedType int `json:"fixedType,omitempty"`
|
||||
SuperId int `json:"superId,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user