唯品尚特卖商品接口
This commit is contained in:
@@ -105,3 +105,31 @@ func (c *WeiPinShangClient) GetGoodsStock(req GetGoodsStockReq) (*[]GoodsStock,
|
||||
res := out.Data
|
||||
return &res, err
|
||||
}
|
||||
|
||||
func (c *WeiPinShangClient) GetSaleVenue(req GetSaleVenueReq) (*SaleVenueList, error) {
|
||||
param := StructToMapString(req)
|
||||
out := GetSaleVenueRes{}
|
||||
err := c.PostAndParse(GetSaleVenueURL, param, &out)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if out.Code != 0 {
|
||||
return nil, fmt.Errorf(out.Msg)
|
||||
}
|
||||
res := out.Data
|
||||
return &res, err
|
||||
}
|
||||
|
||||
func (c *WeiPinShangClient) GetSaleVenueGoods(req GetSaleVenueGoodsReq) (*SaleVenueGoodsList, error) {
|
||||
param := StructToMapString(req)
|
||||
out := GetSaleVenueGoodsRes{}
|
||||
err := c.PostAndParse(GetSaleVenueGoodsURL, param, &out)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if out.Code != 0 {
|
||||
return nil, fmt.Errorf(out.Msg)
|
||||
}
|
||||
res := out.Data
|
||||
return &res, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user