parent
9c45768c4e
commit
6b15e8268d
@ -1,8 +1,11 @@
|
||||
package jd
|
||||
|
||||
import "git.oa00.com/supply-chain/service/jd/jdsdk"
|
||||
|
||||
type Jd struct {
|
||||
Task task
|
||||
Brand brand
|
||||
Category category
|
||||
Sku sku
|
||||
Jdsdk jdsdk.Jdsdk
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package jdsdk
|
||||
|
||||
import (
|
||||
"context"
|
||||
order2 "git.oa00.com/go/jdsdk/order"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
)
|
||||
|
||||
type afterSale struct {
|
||||
}
|
||||
|
||||
// Info @Title 售后详情
|
||||
func (a *afterSale) Info(ctx context.Context, afsServiceId uint64) (reply order2.AfterSaleInfo, err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Info", afsServiceId, &reply)
|
||||
return
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package jdsdk
|
||||
|
||||
type Jdsdk struct {
|
||||
Order order
|
||||
Sku sku
|
||||
AfterSale afterSale
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package jdsdk
|
||||
|
||||
import (
|
||||
"context"
|
||||
order2 "git.oa00.com/go/jdsdk/order"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
)
|
||||
|
||||
type order struct {
|
||||
}
|
||||
|
||||
// Cancel @Title 订单取消 京东订单id
|
||||
func (o *order) Cancel(ctx context.Context, orderId string) (reply order2.OrderInfo, err error) {
|
||||
xClient, err := client.GetClient(o)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Cancel", orderId, &reply)
|
||||
return
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package jdsdk
|
||||
|
||||
import (
|
||||
"context"
|
||||
sku2 "git.oa00.com/go/jdsdk/sku"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
)
|
||||
|
||||
type sku struct {
|
||||
}
|
||||
|
||||
// GetDetail @Title 获取商品详情 sku最大20
|
||||
func (s *sku) GetDetail(ctx context.Context, jdSkuIds []uint64) (reply []sku2.Detail, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "GetDetail", jdSkuIds, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// GetPriceList @Title 获取商品价格列表 最大100
|
||||
func (s *sku) GetPriceList(ctx context.Context, jdSkuIds []uint64) (reply []sku2.PriceItem, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "GetPriceList", jdSkuIds, &reply)
|
||||
return
|
||||
}
|
Loading…
Reference in new issue