jd

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

jd-go - 京东联盟开发 Golang SDK(开发工具包)

travis-image License

使用方式

注意:最新版本(包括测试版)为 GitHub release

go get -u github.com/cooiter/jd-union

使用Demo

使用例子

j := NewJdService("<app_key>", "<app_secret>")
// goods api
g := j.GetGoodsService()
res, err := g.GoodsJingfenQuery(&GoodsJingfenQueryRequest{
    EliteId: 33,
})
if err != nil {
    fmt.Println(res)
}

Documentation

Overview

jd联盟go-sdk

jd联盟go-sdk

jd联盟go-sdk

Index

Constants

View Source
const (
	UnionRootEndpoint = "https://router.jd.com/api"     // 京东联盟API路由: 参数: param_json
	JosRootEndpoint   = "https://api.jd.com/routerjson" // 宙斯API路由 🤣: 参数: 360buy_param_json
	BaseUrl           = UnionRootEndpoint
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityQueryRequest

type ActivityQueryRequest struct {
	PageIndex  uint64 `json:"pageIndex,omitempty"`  // 页码,默认1
	PageSize   uint64 `json:"pageSize,omitempty"`   // 每页数量,默认20,上限50
	PoolId     uint64 `json:"poolId,omitempty"`     // 活动物料ID,1:营销日历热门会场;2:营销日历热门榜单;6:PC站长端官方活动
	ActiveDate uint64 `json:"activeDate,omitempty"` // 按单个日期查询活动,查询日期范围为过去或未来15天。建议按日期依次查询当天及未来的活动
}

func (ActivityQueryRequest) Method

func (m ActivityQueryRequest) Method() string

func (ActivityQueryRequest) Params

func (m ActivityQueryRequest) Params() cmap.CMap

type ActivityQueryResult

type ActivityQueryResult struct {
	BaseResult
	JdUnionOpenActivityQueryResponse UnionResult    `json:"jd_union_open_activity_query_response"`
	JdUnionOpenActivityQueryResponce JosQueryResult `json:"jd_union_open_activity_query_responce"`
}

func (*ActivityQueryResult) Error

func (r *ActivityQueryResult) Error() string

func (*ActivityQueryResult) GetResult

func (r *ActivityQueryResult) GetResult() []byte

func (*ActivityQueryResult) String

func (r *ActivityQueryResult) String() string

type ActivityService

type ActivityService interface {
	// 活动查询接口
	//    文档: https://union.jd.com/openplatform/api/12667
	ActivityQuery(*ActivityQueryRequest) (*ActivityQueryResult, error)
	// 京享红包效果数据
	//    文档: https://union.jd.com/openplatform/api/14416
	StatisticsRedpacketQuery(*StatisticsRedpacketQueryRequest) (*StatisticsRedpacketQueryResult, error)

	// 活动查询接口
	//    文档: https://union.jd.com/openplatform/api/12667
	ActivityQueryResult(request *ActivityQueryRequest) ([]byte, error)
	// 京享红包效果数据
	//    文档: https://union.jd.com/openplatform/api/14416
	StatisticsRedpacketQueryResult(request *StatisticsRedpacketQueryRequest) ([]byte, error)

	// 活动查询接口
	//    文档: https://union.jd.com/openplatform/api/12667
	ActivityQueryMap(request *ActivityQueryRequest) (map[string]interface{}, error)
	// 京享红包效果数据
	//    文档: https://union.jd.com/openplatform/api/14416
	StatisticsRedpacketQueryMap(request *StatisticsRedpacketQueryRequest) (map[string]interface{}, error)
}

type ActivityServiceImpl

type ActivityServiceImpl struct {
	// contains filtered or unexported fields
}

func (*ActivityServiceImpl) ActivityQuery

func (act *ActivityServiceImpl) ActivityQuery(request *ActivityQueryRequest) (*ActivityQueryResult, error)

活动查询接口

文档: https://union.jd.com/openplatform/api/12667

func (*ActivityServiceImpl) ActivityQueryMap

func (act *ActivityServiceImpl) ActivityQueryMap(request *ActivityQueryRequest) (map[string]interface{}, error)

活动查询接口

文档: https://union.jd.com/openplatform/api/12667

func (*ActivityServiceImpl) ActivityQueryResult

func (act *ActivityServiceImpl) ActivityQueryResult(request *ActivityQueryRequest) ([]byte, error)

活动查询接口

文档: https://union.jd.com/openplatform/api/12667

func (*ActivityServiceImpl) StatisticsRedpacketQuery

京享红包效果数据

文档: https://union.jd.com/openplatform/api/14416

func (*ActivityServiceImpl) StatisticsRedpacketQueryMap

func (act *ActivityServiceImpl) StatisticsRedpacketQueryMap(request *StatisticsRedpacketQueryRequest) (map[string]interface{}, error)

京享红包效果数据

文档: https://union.jd.com/openplatform/api/14416

func (*ActivityServiceImpl) StatisticsRedpacketQueryResult

func (act *ActivityServiceImpl) StatisticsRedpacketQueryResult(request *StatisticsRedpacketQueryRequest) ([]byte, error)

京享红包效果数据

文档: https://union.jd.com/openplatform/api/14416

type BaseResult

type BaseResult struct {
	ErrorResponse ErrorResponse `json:"error_response"`
}

基础响应

func (*BaseResult) Error

func (b *BaseResult) Error() string

func (*BaseResult) GetResult

func (b *BaseResult) GetResult() []byte

func (*BaseResult) IsSuccess

func (b *BaseResult) IsSuccess() bool

func (*BaseResult) String

func (b *BaseResult) String() string

type CategoryGoodsGetRequest

type CategoryGoodsGetRequest struct {
	ParentId uint64 `json:"parentId"` // 父类目id(一级父类目为0)
	Grade    uint64 `json:"grade"`    // 类目级别(类目级别 0,1,2 代表一、二、三级类目)
}

func (CategoryGoodsGetRequest) Method

func (m CategoryGoodsGetRequest) Method() string

func (CategoryGoodsGetRequest) Params

func (m CategoryGoodsGetRequest) Params() cmap.CMap

type CategoryGoodsGetResult

type CategoryGoodsGetResult struct {
	BaseResult
	JdUnionOpenCategoryGoodsGetResponse UnionResult  `json:"jd_union_open_category_goods_get_response"`
	JdUnionOpenCategoryGoodsGetResponce JosGetResult `json:"jd_union_open_category_goods_get_responce"`
}

func (*CategoryGoodsGetResult) Error

func (r *CategoryGoodsGetResult) Error() string

func (*CategoryGoodsGetResult) GetResult

func (r *CategoryGoodsGetResult) GetResult() []byte

func (*CategoryGoodsGetResult) String

func (r *CategoryGoodsGetResult) String() string

type Config

type Config struct {
	Method      Method `json:"method"`       // API接口名称
	AppKey      string `json:"app_key"`      // 分配给应用的AppKey
	AccessToken string `json:"access_token"` // Oauth2颁发的动态令牌,根据API属性标签,如果需要授权,则此参数必传;如果不需要授权,则此参数不需要传
	Timestamp   string `json:"timestamp"`    // 时间戳,格式为yyyy-MM-dd  HH:mm:ss,时区为GMT+8。API服务端允许客户端请求最大时间误差为10分钟
	Format      string `json:"format"`       // 响应格式。暂时只支持json
	Version     string `json:"v"`            // API协议版本,可选值:2.0,请根据API具体版本号传入此参数,一般为1.0
	SignMethod  string `json:"sign_method"`  // 签名的摘要算法, md5
	Sign        string `json:"sign"`         // API输入参数签名结果
	SecretKey   string `json:"-"`            // api秘钥
	RouteApi    string `json:"-"`            // 路由API,默认京东联盟
}

系统配置/系统参数

func NewConfig

func NewConfig(appKey, secretKey string) *Config

默认京东联盟

type CouponGiftGetRequest

type CouponGiftGetRequest struct {
	SkuMaterialId    string  `json:"skuMaterialId"`    // 商品skuId或落地页地址
	Discount         float64 `json:"discount"`         // 优惠券面额,最小不可低于1元,最大不可超过pop商品价格的80%,自营商品价格的50%
	Amount           uint64  `json:"amount"`           // 总数量
	ReceiveStartTime string  `json:"receiveStartTime"` // 领取开始时间(yyyy-MM-dd HH),区间为(创建当天0点直至未来6天内),系统补充为yyyy-MM-dd HH:00:00
	ReceiveEndTime   string  `json:"receiveEndTime"`   // 领取结束时间(yyyy-MM-dd HH),区间为(创建当前时间点直至未来6天内),系统补充为yyyy-MM-dd HH:59:59
	IsSpu            uint64  `json:"isSpu"`            // 是否绑定同spu商品(1:是;0:否),例如skuMaterialId输入一款37码的鞋,当isSpu选择1时,此款鞋的全部尺码均可推广这张礼金;当isSpu选择0时,此款鞋仅37码可推广这张礼金,其他鞋码不支持
	ExpireType       uint64  `json:"expireType"`       // 使用时间类型:1.相对时间,需配合effectiveDays一同传入;2.绝对时间,需配合useStartTime和useEndTime一同传入
	Share            uint64  `json:"share"`            // 每个礼金推广链接是否限制仅可领取1张礼金:-1不限,1限制

	EffectiveDays uint64 `json:"effectiveDays,omitempty"` // 消费者领取后n天内可用,时间天数1至7,当expireType=1时,必须设置该字段
	UseStartTime  string `json:"useStartTime,omitempty"`  // 消费者领取后的使用开始时间,格式:yyyy-MM-dd,系统补充为yyyy-MM-dd HH:00:00,当expireType=2时,必须设置该字段
	UseEndTime    string `json:"useEndTime,omitempty"`    // 消费者领取后的使用结束时间,格式:yyyy-MM-dd,系统补充为yyyy-MM-dd HH:59:59,当expireType=2时,必须设置该字段
	ContentMatch  uint64 `json:"contentMatch,omitempty"`  // 是否允许通过内容平台推广,0:不允许,1:允许;默认为0
}

func (CouponGiftGetRequest) Method

func (m CouponGiftGetRequest) Method() string

func (CouponGiftGetRequest) Params

func (m CouponGiftGetRequest) Params() cmap.CMap

type CouponGiftGetResult

type CouponGiftGetResult struct {
	BaseResult
	JdUnionOpenCouponGiftGetResponse UnionResult  `json:"jd_union_open_coupon_gift_get_response"`
	JdUnionOpenCouponGiftGetResponce JosGetResult `json:"jd_union_open_coupon_gift_get_responce"`
}

func (*CouponGiftGetResult) Error

func (r *CouponGiftGetResult) Error() string

func (*CouponGiftGetResult) GetResult

func (r *CouponGiftGetResult) GetResult() []byte

func (*CouponGiftGetResult) String

func (r *CouponGiftGetResult) String() string

type CouponGiftStopRequest

type CouponGiftStopRequest struct {
	GiftCouponKey string `json:"giftCouponKey"` // 礼金批次ID
}

func (CouponGiftStopRequest) Method

func (m CouponGiftStopRequest) Method() string

func (CouponGiftStopRequest) Params

func (m CouponGiftStopRequest) Params() cmap.CMap

type CouponGiftStopResult

type CouponGiftStopResult struct {
	BaseResult
	JdUnionOpenCouponGiftStopResponse UnionResult   `json:"jd_union_open_coupon_gift_stop_response"`
	JdUnionOpenCouponGiftStopResponce JosStopResult `json:"jd_union_open_coupon_gift_stop_responce"`
}

func (*CouponGiftStopResult) Error

func (r *CouponGiftStopResult) Error() string

func (*CouponGiftStopResult) GetResult

func (r *CouponGiftStopResult) GetResult() []byte

func (*CouponGiftStopResult) String

func (r *CouponGiftStopResult) String() string

type CouponQueryRequest

type CouponQueryRequest struct {
	CouponUrl string `json:"couponUrl"` // 优惠券链接
}

func (CouponQueryRequest) Method

func (m CouponQueryRequest) Method() string

func (CouponQueryRequest) Params

func (m CouponQueryRequest) Params() cmap.CMap

type CouponQueryResult

type CouponQueryResult struct {
	BaseResult
	JdUnionOpenCouponQueryResponse UnionResult    `json:"jd_union_open_coupon_query_response"`
	JdUnionOpenCouponQueryResponce JosQueryResult `json:"jd_union_open_coupon_query_responce"`
}

func (*CouponQueryResult) Error

func (r *CouponQueryResult) Error() string

func (*CouponQueryResult) GetResult

func (r *CouponQueryResult) GetResult() []byte

func (*CouponQueryResult) String

func (r *CouponQueryResult) String() string

type CouponService

type CouponService interface {
	// 优惠券领取情况查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQuery([]*CouponQueryRequest) (*CouponQueryResult, error)
	// 优惠券领取情况查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQueryByUrls(urls ...string) (*CouponQueryResult, error)

	// 优惠券领取情况查询接口【申请】
	// Deprecated: 使用 CouponQueryByUrls
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQueryByList(urls ...string) (*CouponQueryResult, error)

	// 优惠券领取情况查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQueryResult(request []*CouponQueryRequest) ([]byte, error)
	// 优惠券领取情况查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQueryResultByUrls(urls ...string) ([]byte, error)

	// 优惠券领取情况查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQueryMap(request []*CouponQueryRequest) (map[string]interface{}, error)
	// 优惠券领取情况查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10423
	CouponQueryMapByUrls(urls ...string) (map[string]interface{}, error)
}

type CouponServiceImpl

type CouponServiceImpl struct {
	// contains filtered or unexported fields
}

func (*CouponServiceImpl) CouponQuery

func (cou *CouponServiceImpl) CouponQuery(request []*CouponQueryRequest) (*CouponQueryResult, error)

优惠券领取情况查询接口【申请】

文档: https://union.jd.com/openplatform/api/10423

func (*CouponServiceImpl) CouponQueryByList

func (cou *CouponServiceImpl) CouponQueryByList(urls ...string) (*CouponQueryResult, error)

优惠券领取情况查询接口【申请】 Deprecated: 使用 CouponQueryByUrls

文档: https://union.jd.com/openplatform/api/10423

func (*CouponServiceImpl) CouponQueryByUrls

func (cou *CouponServiceImpl) CouponQueryByUrls(urls ...string) (*CouponQueryResult, error)

优惠券领取情况查询接口【申请】

文档: https://union.jd.com/openplatform/api/10423

func (*CouponServiceImpl) CouponQueryMap

func (cou *CouponServiceImpl) CouponQueryMap(request []*CouponQueryRequest) (map[string]interface{}, error)

优惠券领取情况查询接口【申请】

文档: https://union.jd.com/openplatform/api/10423

func (*CouponServiceImpl) CouponQueryMapByUrls

func (cou *CouponServiceImpl) CouponQueryMapByUrls(urls ...string) (map[string]interface{}, error)

优惠券领取情况查询接口【申请】

文档: https://union.jd.com/openplatform/api/10423

func (*CouponServiceImpl) CouponQueryResult

func (cou *CouponServiceImpl) CouponQueryResult(request []*CouponQueryRequest) ([]byte, error)

优惠券领取情况查询接口【申请】

文档: https://union.jd.com/openplatform/api/10423

func (*CouponServiceImpl) CouponQueryResultByUrls

func (cou *CouponServiceImpl) CouponQueryResultByUrls(urls ...string) ([]byte, error)

优惠券领取情况查询接口【申请】

文档: https://union.jd.com/openplatform/api/10423

type ErrorResponse

type ErrorResponse struct {
	Code   string `json:"code"`
	ZhDesc string `json:"zh_desc"`
	EnDesc string `json:"en_desc"`
}

type GiftService

type GiftService interface {
	// 礼金创建
	//    文档: https://union.jd.com/openplatform/api/12246
	CouponGiftGet(*CouponGiftGetRequest) (*CouponGiftGetResult, error)
	// 礼金停止
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftStop(*CouponGiftStopRequest) (*CouponGiftStopResult, error)
	// 礼金停止
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftStopByKey(giftCouponKey string) (*CouponGiftStopResult, error)
	// 礼金效果数据
	//    文档: https://union.jd.com/openplatform/api/12248
	StatisticGiftCouponQuery(*StatisticGiftCouponQueryRequest) (*StatisticGiftCouponQueryResult, error)
	// 礼金停止
	// Deprecated: 使用 CouponGiftStopByKey
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftStopBy(giftCouponKey string) (*CouponGiftStopResult, error)

	// 礼金创建
	//    文档: https://union.jd.com/openplatform/api/12246
	CouponGiftStopResult(request *CouponGiftStopRequest) ([]byte, error)
	// 礼金停止
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftGetResult(request *CouponGiftGetRequest) ([]byte, error)
	// 礼金停止
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftStopResultByKey(giftCouponKey string) ([]byte, error)
	// 礼金效果数据
	//    文档: https://union.jd.com/openplatform/api/12248
	StatisticGiftCouponQueryResult(request *StatisticGiftCouponQueryRequest) ([]byte, error)

	// 礼金创建
	//    文档: https://union.jd.com/openplatform/api/12246
	CouponGiftStopMap(request *CouponGiftStopRequest) (map[string]interface{}, error)
	// 礼金停止
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftGetMap(request *CouponGiftGetRequest) (map[string]interface{}, error)
	// 礼金停止
	//    文档: https://union.jd.com/openplatform/api/12240
	CouponGiftStopMapByKey(giftCouponKey string) (map[string]interface{}, error)
	// 礼金效果数据
	//    文档: https://union.jd.com/openplatform/api/12248
	StatisticGiftCouponQueryMap(request *StatisticGiftCouponQueryRequest) (map[string]interface{}, error)
}

type GiftServiceImpl

type GiftServiceImpl struct {
	// contains filtered or unexported fields
}

func (*GiftServiceImpl) CouponGiftGet

func (gift *GiftServiceImpl) CouponGiftGet(request *CouponGiftGetRequest) (*CouponGiftGetResult, error)

礼金创建

文档: https://union.jd.com/openplatform/api/12246

func (*GiftServiceImpl) CouponGiftGetMap

func (gift *GiftServiceImpl) CouponGiftGetMap(request *CouponGiftGetRequest) (map[string]interface{}, error)

礼金创建

文档: https://union.jd.com/openplatform/api/12246

func (*GiftServiceImpl) CouponGiftGetResult

func (gift *GiftServiceImpl) CouponGiftGetResult(request *CouponGiftGetRequest) ([]byte, error)

礼金创建

文档: https://union.jd.com/openplatform/api/12246

func (*GiftServiceImpl) CouponGiftStop

func (gift *GiftServiceImpl) CouponGiftStop(request *CouponGiftStopRequest) (*CouponGiftStopResult, error)

礼金停止

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) CouponGiftStopBy

func (gift *GiftServiceImpl) CouponGiftStopBy(giftCouponKey string) (*CouponGiftStopResult, error)

礼金停止 Deprecated: 使用 CouponGiftStopByKey

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) CouponGiftStopByKey

func (gift *GiftServiceImpl) CouponGiftStopByKey(giftCouponKey string) (*CouponGiftStopResult, error)

礼金停止

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) CouponGiftStopMap

func (gift *GiftServiceImpl) CouponGiftStopMap(request *CouponGiftStopRequest) (map[string]interface{}, error)

礼金停止

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) CouponGiftStopMapByKey

func (gift *GiftServiceImpl) CouponGiftStopMapByKey(giftCouponKey string) (map[string]interface{}, error)

礼金停止

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) CouponGiftStopResult

func (gift *GiftServiceImpl) CouponGiftStopResult(request *CouponGiftStopRequest) ([]byte, error)

礼金停止

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) CouponGiftStopResultByKey

func (gift *GiftServiceImpl) CouponGiftStopResultByKey(giftCouponKey string) ([]byte, error)

礼金停止

文档: https://union.jd.com/openplatform/api/12240

func (*GiftServiceImpl) StatisticGiftCouponQuery

func (gift *GiftServiceImpl) StatisticGiftCouponQuery(request *StatisticGiftCouponQueryRequest) (*StatisticGiftCouponQueryResult, error)

礼金效果数据

文档: https://union.jd.com/openplatform/api/12248

func (*GiftServiceImpl) StatisticGiftCouponQueryMap

func (gift *GiftServiceImpl) StatisticGiftCouponQueryMap(request *StatisticGiftCouponQueryRequest) (map[string]interface{}, error)

礼金效果数据

文档: https://union.jd.com/openplatform/api/12248

func (*GiftServiceImpl) StatisticGiftCouponQueryResult

func (gift *GiftServiceImpl) StatisticGiftCouponQueryResult(request *StatisticGiftCouponQueryRequest) ([]byte, error)

礼金效果数据

文档: https://union.jd.com/openplatform/api/12248

type GoodsGigFieldQueryRequest

type GoodsGigFieldQueryRequest struct {
	SkuIds []uint64 `json:"skuIds"` // skuId集合,最多支持批量入参10个sku

	Fields []string `json:"fields,omitempty"` // 查询域集合,不填写则查询全部,目目前支持:categoryInfo(类目信息),imageInfo(图片信息),baseBigFieldInfo(基础大字段信息),bookBigFieldInfo(图书大字段信息),videoBigFieldInfo(影音大字段信息),detailImages(商详图)
}

func (GoodsGigFieldQueryRequest) Method

func (m GoodsGigFieldQueryRequest) Method() string

func (GoodsGigFieldQueryRequest) Params

func (m GoodsGigFieldQueryRequest) Params() cmap.CMap

type GoodsGigFieldQueryResult

type GoodsGigFieldQueryResult struct {
	BaseResult
	JdUnionOpenGoodsBigfieldQueryResponse UnionResult    `json:"jd_union_open_goods_bigfield_query_response"`
	JdUnionOpenGoodsBigfieldQueryResponce JosQueryResult `json:"jd_union_open_goods_bigfield_query_responce"`
}

func (*GoodsGigFieldQueryResult) Error

func (r *GoodsGigFieldQueryResult) Error() string

func (*GoodsGigFieldQueryResult) GetResult

func (r *GoodsGigFieldQueryResult) GetResult() []byte

func (*GoodsGigFieldQueryResult) String

func (r *GoodsGigFieldQueryResult) String() string

type GoodsJingfenQueryRequest

type GoodsJingfenQueryRequest struct {
	EliteId uint64 `json:"eliteId"` // 频道ID:1-好券商品,2-精选卖场,10-9.9包邮,15-京东配送,22-实时热销榜,23-为你推荐,24-数码家电,25-超市,26-母婴玩具,27-家具日用,28-美妆穿搭,30-图书文具,

	PageIndex   uint64 `json:"pageIndex,omitempty"`   // 页码,默认1
	PageSize    uint64 `json:"pageSize,omitempty"`    // 每页数量,默认20,上限50,建议20
	SortName    string `json:"sortName,omitempty"`    // 排序字段(price:单价, commissionShare:佣金比例, commission:佣金, inOrderCount30DaysSku:sku维度30天引单量,comments:评论数,goodComments:好评数)
	Sort        string `json:"sort,omitempty"`        // asc,desc升降序,默认降序
	Pid         string `json:"pid,omitempty"`         // 联盟id_应用id_推广位id,三段式
	Fields      string `json:"fields,omitempty"`      // 支持出参数据筛选,逗号','分隔,目前可用:videoInfo,documentInfo
	ForbidTypes string `json:"forbidTypes,omitempty"` // 10微信京东购物小程序禁售,11微信京喜小程序禁售
}

func (GoodsJingfenQueryRequest) Method

func (m GoodsJingfenQueryRequest) Method() string

func (GoodsJingfenQueryRequest) Params

func (m GoodsJingfenQueryRequest) Params() cmap.CMap

type GoodsJingfenQueryResult

type GoodsJingfenQueryResult struct {
	BaseResult
	JdUnionOpenGoodsJingfenQueryResponse UnionResult    `json:"jd_union_open_goods_jingfen_query_response"`
	JdUnionOpenGoodsJingfenQueryResponce JosQueryResult `json:"jd_union_open_goods_jingfen_query_responce"`
}

func (*GoodsJingfenQueryResult) Error

func (r *GoodsJingfenQueryResult) Error() string

func (*GoodsJingfenQueryResult) GetResult

func (r *GoodsJingfenQueryResult) GetResult() []byte

func (*GoodsJingfenQueryResult) IsSuccess

func (r *GoodsJingfenQueryResult) IsSuccess() bool

func (*GoodsJingfenQueryResult) String

func (r *GoodsJingfenQueryResult) String() string

type GoodsPromotiongoodsinfoQueryResult

type GoodsPromotiongoodsinfoQueryResult struct {
	BaseResult
	JdUnionOpenGoodsPromotiongoodsinfoQueryResponse UnionResult    `json:"jd_union_open_goods_promotiongoodsinfo_query_response"`
	JdUnionOpenGoodsPromotiongoodsinfoQueryResponce JosQueryResult `json:"jd_union_open_goods_promotiongoodsinfo_query_responce"`
}

func (*GoodsPromotiongoodsinfoQueryResult) Error

func (*GoodsPromotiongoodsinfoQueryResult) GetResult

func (r *GoodsPromotiongoodsinfoQueryResult) GetResult() []byte

func (*GoodsPromotiongoodsinfoQueryResult) String

type GoodsQueryRequest

type GoodsQueryRequest struct {
	Cid1                 uint64   `json:"cid1,omitempty"`                 // 一级类目id
	Cid2                 uint64   `json:"cid2,omitempty"`                 // 二级类目id
	Cid3                 uint64   `json:"cid3,omitempty"`                 // 三级类目id
	PageIndex            uint64   `json:"pageIndex,omitempty"`            // 页码
	PageSize             uint64   `json:"pageSize,omitempty"`             // 每页数量,单页数最大30,默认20
	SkuIds               []uint64 `json:"skuIds,omitempty"`               // skuid集合(一次最多支持查询100个sku),数组类型开发时记得加[]
	Keyword              string   `json:"keyword,omitempty"`              // 关键词,字数同京东商品名称一致,目前未限制
	Pricefrom            float64  `json:"pricefrom,omitempty"`            // 商品价格下限
	Priceto              float64  `json:"priceto,omitempty"`              // 商品价格上限
	CommissionShareStart uint64   `json:"commissionShareStart,omitempty"` // 佣金比例区间开始
	CommissionShareEnd   uint64   `json:"commissionShareEnd,omitempty"`   // 佣金比例区间结束
	Owner                string   `json:"owner,omitempty"`                // 商品类型:自营[g],POP[p]
	SortName             string   `json:"sortName,omitempty"`             // 排序字段(price:单价, commissionShare:佣金比例, commission:佣金, inOrderCount30Days:30天引单量, inOrderComm30Days:30天支出佣金)
	Sort                 string   `json:"sort,omitempty"`                 // asc,desc升降序,默认降序
	IsCoupon             uint64   `json:"isCoupon,omitempty"`             // 是否是优惠券商品,1:有优惠券,0:无优惠券
	IsPG                 string   `json:"isPG,omitempty"`                 // 是否是拼购商品,1:拼购商品,0:非拼购商品
	PingouPriceStart     float64  `json:"pingouPriceStart,omitempty"`     // 拼购价格区间开始
	PingouPriceEnd       float64  `json:"pingouPriceEnd,omitempty"`       // 拼购价格区间结束
	IsHot                uint64   `json:"-"`                              // Deprecated: 已废弃,请勿使用
	BrandCode            string   `json:"brandCode,omitempty"`            // 品牌code
	ShopId               uint64   `json:"shopId,omitempty"`               // 店铺Id
	HasContent           uint64   `json:"hasContent,omitempty"`           // 1:查询内容商品;其他值过滤掉此入参条件。
	HasBestCoupon        uint64   `json:"hasBestCoupon,omitempty"`        // 1:查询有最优惠券商品;其他值过滤掉此入参条件。
	Pid                  string   `json:"pid,omitempty"`                  // 联盟id_应用iD_推广位id
	Fields               string   `json:"fields,omitempty"`               // 支持出参数据筛选,逗号','分隔,目前可用:videoInfo(视频信息),hotWords(热词),similar(相似推荐商品),documentInfo(段子信息),bookInfo(图书信息),specInfo(扩展信息)
	ForbidTypes          string   `json:"forbidTypes,omitempty"`          // 10微信京东购物小程序禁售,11微信京喜小程序禁售
	JxFlags              []uint64 `json:"jxFlags,omitempty"`              // 京喜商品类型,1京喜、2京喜工厂直供、3京喜优选(包含3时可在京东APP购买),入参多个值表示或条件查询
	ShopLevelFrom        float64  `json:"shopLevelFrom,omitempty"`        // 支持传入0.0、2.5、3.0、3.5、4.0、4.5、4.9,默认为空表示不筛选评分
	DeliveryType         uint64   `json:"deliveryType,omitempty"`         // 京东配送 1:是,0:不是
	Isbn                 string   `json:"isbn,omitempty"`                 // 图书编号
}

func (GoodsQueryRequest) Method

func (m GoodsQueryRequest) Method() string

func (GoodsQueryRequest) Params

func (m GoodsQueryRequest) Params() cmap.CMap

type GoodsQueryResult

type GoodsQueryResult struct {
	BaseResult
	JdUnionOpenGoodsQueryResponse UnionResult    `json:"jd_union_open_goods_query_response"`
	JdUnionOpenGoodsQueryResponce JosQueryResult `json:"jd_union_open_goods_query_responce"`
}

func (*GoodsQueryResult) Error

func (r *GoodsQueryResult) Error() string

func (*GoodsQueryResult) GetResult

func (r *GoodsQueryResult) GetResult() []byte

func (*GoodsQueryResult) String

func (r *GoodsQueryResult) String() string

type GoodsService

type GoodsService interface {
	// 京粉精选商品查询接口
	//    文档: https://union.jd.com/openplatform/api/10417
	GoodsJingfenQuery(*GoodsJingfenQueryRequest) (*GoodsJingfenQueryResult, error)
	// 关键词商品查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10420
	GoodsQuery(*GoodsQueryRequest) (*GoodsQueryResult, error)
	/* 根据skuid查询商品信息接口
	   skuIds: 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}
	  (非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息)*/
	//    文档: https://union.jd.com/openplatform/api/10422
	GoodsPromotiongoodsinfoQuery(skuIds string) (*GoodsPromotiongoodsinfoQueryResult, error)
	// 商品类目查询接口
	// Deprecated: 使用新接口: CategoryGoodsGet
	//    文档: https://union.jd.com/openplatform/api/10434
	CategoryGoodsGetQuery(*CategoryGoodsGetRequest) (*CategoryGoodsGetResult, error)
	// 商品类目查询接口
	//    文档: https://union.jd.com/openplatform/api/10434
	CategoryGoodsGet(*CategoryGoodsGetRequest) (*CategoryGoodsGetResult, error)
	// 商品详情查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/11248
	GoodsGigfieldQuery(*GoodsGigFieldQueryRequest) (*GoodsGigFieldQueryResult, error)

	// 京粉精选商品查询接口
	//    文档: https://union.jd.com/openplatform/api/10417
	GoodsJingfenQueryResult(*GoodsJingfenQueryRequest) ([]byte, error)
	// 关键词商品查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10420
	GoodsQueryResult(*GoodsQueryRequest) ([]byte, error)
	/* 根据skuid查询商品信息接口
	   skuIds: 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}
	  (非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息)*/
	//    文档: https://union.jd.com/openplatform/api/10422
	GoodsPromotiongoodsinfoQueryResult(skuIds string) ([]byte, error)
	// 商品类目查询接口
	// Deprecated: 使用新接口: GoodsService.CategoryGoodsGetResult
	//    文档: https://union.jd.com/openplatform/api/10434
	CategoryGoodsGetQueryResult(*CategoryGoodsGetRequest) ([]byte, error)
	// 商品类目查询接口
	//    文档: https://union.jd.com/openplatform/api/10434
	CategoryGoodsGetResult(*CategoryGoodsGetRequest) ([]byte, error)
	// 商品详情查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/11248
	GoodsGigfieldQueryResult(request *GoodsGigFieldQueryRequest) ([]byte, error)

	// 京粉精选商品查询接口
	//    文档: https://union.jd.com/openplatform/api/10417
	GoodsJingfenQueryMap(*GoodsJingfenQueryRequest) (map[string]interface{}, error)
	// 关键词商品查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10420
	GoodsQueryMap(*GoodsQueryRequest) (map[string]interface{}, error)
	/* 根据skuid查询商品信息接口
	   skuIds: 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}
	  (非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息)*/
	//    文档: https://union.jd.com/openplatform/api/10422
	GoodsPromotiongoodsinfoQueryMap(skuIds string) (map[string]interface{}, error)
	// 商品类目查询接口
	// Deprecated: 使用新接口: CategoryGoodsGetMap
	//    文档: https://union.jd.com/openplatform/api/10434
	CategoryGoodsGetQueryMap(*CategoryGoodsGetRequest) (map[string]interface{}, error)
	// 商品类目查询接口
	//    文档: https://union.jd.com/openplatform/api/10434
	CategoryGoodsGetMap(*CategoryGoodsGetRequest) (map[string]interface{}, error)
	// 商品详情查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/11248
	GoodsGigfieldQueryMap(request *GoodsGigFieldQueryRequest) (map[string]interface{}, error)
}

type GoodsServiceImpl

type GoodsServiceImpl struct {
	// contains filtered or unexported fields
}

func (*GoodsServiceImpl) CategoryGoodsGet

func (goods *GoodsServiceImpl) CategoryGoodsGet(request *CategoryGoodsGetRequest) (*CategoryGoodsGetResult, error)

商品类目查询接口

文档: https://union.jd.com/openplatform/api/10434

func (*GoodsServiceImpl) CategoryGoodsGetMap

func (goods *GoodsServiceImpl) CategoryGoodsGetMap(request *CategoryGoodsGetRequest) (map[string]interface{}, error)

商品类目查询接口

文档: https://union.jd.com/openplatform/api/10434

func (*GoodsServiceImpl) CategoryGoodsGetQuery

func (goods *GoodsServiceImpl) CategoryGoodsGetQuery(request *CategoryGoodsGetRequest) (*CategoryGoodsGetResult, error)

商品类目查询接口 Deprecated: 使用新接口: CategoryGoodsGet

文档: https://union.jd.com/openplatform/api/10434

func (*GoodsServiceImpl) CategoryGoodsGetQueryMap

func (goods *GoodsServiceImpl) CategoryGoodsGetQueryMap(request *CategoryGoodsGetRequest) (map[string]interface{}, error)

商品类目查询接口 Deprecated: 使用新接口: CategoryGoodsGetMap

文档: https://union.jd.com/openplatform/api/10434

func (*GoodsServiceImpl) CategoryGoodsGetQueryResult

func (goods *GoodsServiceImpl) CategoryGoodsGetQueryResult(request *CategoryGoodsGetRequest) ([]byte, error)

商品类目查询接口 Deprecated: 使用新接口: GoodsService.CategoryGoodsGetResult

文档: https://union.jd.com/openplatform/api/10434

func (*GoodsServiceImpl) CategoryGoodsGetResult

func (goods *GoodsServiceImpl) CategoryGoodsGetResult(request *CategoryGoodsGetRequest) ([]byte, error)

商品类目查询接口

文档: https://union.jd.com/openplatform/api/10434

func (*GoodsServiceImpl) GoodsGigfieldQuery

func (goods *GoodsServiceImpl) GoodsGigfieldQuery(request *GoodsGigFieldQueryRequest) (*GoodsGigFieldQueryResult, error)

商品详情查询接口【申请】

文档: https://union.jd.com/openplatform/api/11248

func (*GoodsServiceImpl) GoodsGigfieldQueryMap

func (goods *GoodsServiceImpl) GoodsGigfieldQueryMap(request *GoodsGigFieldQueryRequest) (map[string]interface{}, error)

商品详情查询接口【申请】

文档: https://union.jd.com/openplatform/api/11248

func (*GoodsServiceImpl) GoodsGigfieldQueryResult

func (goods *GoodsServiceImpl) GoodsGigfieldQueryResult(request *GoodsGigFieldQueryRequest) ([]byte, error)

商品详情查询接口【申请】

文档: https://union.jd.com/openplatform/api/11248

func (*GoodsServiceImpl) GoodsJingfenQuery

func (goods *GoodsServiceImpl) GoodsJingfenQuery(request *GoodsJingfenQueryRequest) (*GoodsJingfenQueryResult, error)

京粉精选商品查询接口

文档: https://union.jd.com/openplatform/api/10417

func (*GoodsServiceImpl) GoodsJingfenQueryMap

func (goods *GoodsServiceImpl) GoodsJingfenQueryMap(request *GoodsJingfenQueryRequest) (map[string]interface{}, error)

京粉精选商品查询接口

文档: https://union.jd.com/openplatform/api/10417

func (*GoodsServiceImpl) GoodsJingfenQueryResult

func (goods *GoodsServiceImpl) GoodsJingfenQueryResult(request *GoodsJingfenQueryRequest) ([]byte, error)

京粉精选商品查询接口

文档: https://union.jd.com/openplatform/api/10417

func (*GoodsServiceImpl) GoodsPromotiongoodsinfoQuery

func (goods *GoodsServiceImpl) GoodsPromotiongoodsinfoQuery(skuIds string) (*GoodsPromotiongoodsinfoQueryResult, error)

根据skuid查询商品信息接口

 skuIds: 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}
(非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息)
 文档: https://union.jd.com/openplatform/api/10422

func (*GoodsServiceImpl) GoodsPromotiongoodsinfoQueryMap

func (goods *GoodsServiceImpl) GoodsPromotiongoodsinfoQueryMap(skuIds string) (map[string]interface{}, error)

根据skuid查询商品信息接口

 skuIds: 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}
(非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息)
 文档: https://union.jd.com/openplatform/api/10422

func (*GoodsServiceImpl) GoodsPromotiongoodsinfoQueryResult

func (goods *GoodsServiceImpl) GoodsPromotiongoodsinfoQueryResult(skuIds string) ([]byte, error)

根据skuid查询商品信息接口

 skuIds: 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}
(非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息)
 文档: https://union.jd.com/openplatform/api/10422

func (*GoodsServiceImpl) GoodsQuery

func (goods *GoodsServiceImpl) GoodsQuery(request *GoodsQueryRequest) (*GoodsQueryResult, error)

关键词商品查询接口【申请】

文档: https://union.jd.com/openplatform/api/10420

func (*GoodsServiceImpl) GoodsQueryMap

func (goods *GoodsServiceImpl) GoodsQueryMap(request *GoodsQueryRequest) (map[string]interface{}, error)

关键词商品查询接口【申请】

文档: https://union.jd.com/openplatform/api/10420

func (*GoodsServiceImpl) GoodsQueryResult

func (goods *GoodsServiceImpl) GoodsQueryResult(request *GoodsQueryRequest) ([]byte, error)

关键词商品查询接口【申请】

文档: https://union.jd.com/openplatform/api/10420

type IParam

type IParam interface {
	// 请求的方法
	Method() string
	// 请求的参数
	Params() cmap.CMap
}

func NewTParam

func NewTParam(method Method, v interface{}) IParam

type JosCreateResult

type JosCreateResult struct {
	Code         string `json:"code"`
	CreateResult string `json:"createResult"`
}

type JosGetResult

type JosGetResult struct {
	Code      string `json:"code"`
	GetResult string `json:"getResult"`
}

type JosQueryResult

type JosQueryResult struct {
	Code        string `json:"code"`
	QueryResult string `json:"queryResult"`
}

type JosStopResult

type JosStopResult struct {
	Code       string `json:"code"`
	StopResult string `json:"stopResult"`
}

type Method

type Method string

请求的方法(接口)

const (
	GoodsJingfenQuery            Method = "jd.union.open.goods.jingfen.query"            // 精选商品查询
	GoodsQuery                   Method = "jd.union.open.goods.query"                    // 关键词商品查询接口【申请】
	GoodsPromotiongoodsinfoQuery Method = "jd.union.open.goods.promotiongoodsinfo.query" // 根据skuid查询商品信息接口
	CategoryGoodsGet             Method = "jd.union.open.category.goods.get"             // 商品类目查询接口
	GoodsGigfieldQuery           Method = "jd.union.open.goods.bigfield.query"           // 商品详情查询接口【申请】
)
const (
	PromotionCommonGet       Method = "jd.union.open.promotion.common.get"       // 网站/APP获取推广链接接口
	PromotionBysubunionidGet Method = "jd.union.open.promotion.bysubunionid.get" // 社交媒体获取推广链接接口【申请】
	PromotionByunionidGet    Method = "jd.union.open.promotion.byunionid.get"    // 工具商获取推广链接接口【申请】
	PromotionAppletGet       Method = "jd.union.open.promotion.applet.get"       // 通过小程序获取推广链接【申请】
)
const (
	OrderQuery      Method = "jd.union.open.order.query"       // 订单查询接口
	OrderBonusQuery Method = "jd.union.open.order.bonus.query" // 奖励订单查询接口【申请】
	OrderRowQuery   Method = "jd.union.open.order.row.query"   // 订单行查询接口
)
const (
	PositionQuery  Method = "jd.union.open.position.query"  // 查询推广位【申请】
	PositionCreate Method = "jd.union.open.position.create" // 创建推广位【申请】
	UserPidGet     Method = "jd.union.open.user.pid.get"    // 获取PID【申请】
)
const (
	CouponGiftStop           Method = "jd.union.open.coupon.gift.stop"            // 礼金停止
	CouponGiftGet            Method = "jd.union.open.coupon.gift.get"             // 礼金创建
	StatisticGiftCouponQuery Method = "jd.union.open.statistics.giftcoupon.query" // 礼金效果数据
)
const (
	ActivityQuery            Method = "jd.union.open.activity.query"             // 活动查询接口
	StatisticsRedpacketQuery Method = "jd.union.open.statistics.redpacket.query" // 京享红包效果数据
)
const (
	CouponQuery Method = "jd.union.open.coupon.query" // 优惠券领取情况查询接口【申请】
)

func (Method) String

func (m Method) String() string

type OrderBonusQueryRequest

type OrderBonusQueryRequest struct {
	OptType   uint64 `json:"optType"`   // 时间类型(1.下单时间拉取、2.更新时间拉取)
	StartTime uint64 `json:"startTime"` // 订单开始时间,时间戳(毫秒),与endTime间隔不超过10分钟
	EndTime   uint64 `json:"endTime"`   // 订单结束时间,时间戳(毫秒),与startTime间隔不超过10分钟
	PageSize  uint64 `json:"pageSize"`  // 每页数量,上限100

	PageNo    uint64 `json:"pageNo,omitempty"`    // 页码,默认值为1
	SortValue string `json:"sortValue,omitempty"` // 时间类型按'下单'查询时,和pageSize组合使用。获取最后一条记录的sortValue,指定拉取条数(pageSize),以此方式查询数据。
}

func (OrderBonusQueryRequest) Method

func (m OrderBonusQueryRequest) Method() string

func (OrderBonusQueryRequest) Params

func (m OrderBonusQueryRequest) Params() cmap.CMap

type OrderBonusQueryResult

type OrderBonusQueryResult struct {
	BaseResult
	JdUnionOpenOrderBonusQueryResponse UnionResult    `json:"jd_union_open_order_bonus_query_response"`
	JdUnionOpenOrderBonusQueryResponce JosQueryResult `json:"jd_union_open_order_bonus_query_responce"`
}

func (*OrderBonusQueryResult) Error

func (r *OrderBonusQueryResult) Error() string

func (*OrderBonusQueryResult) GetResult

func (r *OrderBonusQueryResult) GetResult() []byte

func (*OrderBonusQueryResult) String

func (r *OrderBonusQueryResult) String() string

type OrderQueryRequest

type OrderQueryRequest struct {
	PageNo   uint64 `json:"pageNo"`   // 页码,返回第几页结果
	PageSize uint64 `json:"pageSize"` // 每页包含条数,上限为500
	Type     uint64 `json:"type"`     // 订单时间查询类型(1:下单时间,2:完成时间(购买用户确认收货时间),3:更新时间
	Time     string `json:"time"`     // 查询时间,建议使用分钟级查询,格式:yyyyMMddHH、yyyyMMddHHmm或yyyyMMddHHmmss,如201811031212 的查询范围从12:12:00--12:12:59

	ChildUnionId uint64 `json:"childUnionId,omitempty"` // 子推客unionID,传入该值可查询子推客的订单,注意不可和key同时传入。(需联系运营开通PID权限才能拿到数据)
	Key          string `json:"key,omitempty"`          // 工具商传入推客的授权key,可帮助该推客查询订单,注意不可和childUnionid同时传入。(需联系运营开通工具商权限才能拿到数据)
}

func (OrderQueryRequest) Method

func (m OrderQueryRequest) Method() string

func (OrderQueryRequest) Params

func (m OrderQueryRequest) Params() cmap.CMap

type OrderQueryResult

type OrderQueryResult struct {
	BaseResult
	JdUnionOpenOrderQueryResponse UnionResult    `json:"jd_union_open_order_query_response"`
	JdUnionOpenOrderQueryResponce JosQueryResult `json:"jd_union_open_order_query_responce"`
}

func (*OrderQueryResult) Error

func (r *OrderQueryResult) Error() string

func (*OrderQueryResult) GetResult

func (r *OrderQueryResult) GetResult() []byte

func (*OrderQueryResult) String

func (r *OrderQueryResult) String() string

type OrderRowQueryRequest

type OrderRowQueryRequest struct {
	PageIndex uint64 `json:"pageIndex"` // 页码
	PageSize  uint64 `json:"pageSize"`  // 每页包含条数,上限为500
	Type      uint64 `json:"type"`      // 订单时间查询类型(1:下单时间,2:完成时间(购买用户确认收货时间),3:更新时间
	StartTime string `json:"startTime"` // 开始时间 格式yyyy-MM-dd HH:mm:ss,与endTime间隔不超过1小时
	EndTime   string `json:"endTime"`   // 结束时间 格式yyyy-MM-dd HH:mm:ss,与startTime间隔不超过1小时

	ChildUnionId uint64 `json:"childUnionId,omitempty"` // 子推客unionID,传入该值可查询子推客的订单,注意不可和key同时传入。(需联系运营开通PID权限才能拿到数据)
	Key          string `json:"key,omitempty"`          // 工具商传入推客的授权key,可帮助该推客查询订单,注意不可和childUnionid同时传入。(需联系运营开通工具商权限才能拿到数据)
	Fields       string `json:"fields,omitempty"`       // 支持出参数据筛选,逗号','分隔,目前可用:goodsInfo(商品信息),categoryInfo(类目信息)
}

func (OrderRowQueryRequest) Method

func (m OrderRowQueryRequest) Method() string

func (OrderRowQueryRequest) Params

func (m OrderRowQueryRequest) Params() cmap.CMap

type OrderRowQueryResult

type OrderRowQueryResult struct {
	BaseResult
	JdUnionOpenOrderRowQueryResponse UnionResult    `json:"jd_union_open_order_row_query_response"`
	JdUnionOpenOrderRowQueryResponce JosQueryResult `json:"jd_union_open_order_row_query_responce"`
}

func (*OrderRowQueryResult) Error

func (r *OrderRowQueryResult) Error() string

func (*OrderRowQueryResult) GetResult

func (r *OrderRowQueryResult) GetResult() []byte

func (*OrderRowQueryResult) String

func (r *OrderRowQueryResult) String() string

type OrderService

type OrderService interface {
	// 订单查询接口
	//    文档: https://union.jd.com/openplatform/api/10419
	OrderQuery(*OrderQueryRequest) (*OrderQueryResult, error)
	// 奖励订单查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/11781
	OrderBonusQuery(*OrderBonusQueryRequest) (*OrderBonusQueryResult, error)
	// 订单行查询接口
	//    文档: https://union.jd.com/openplatform/api/12707
	OrderRowQuery(*OrderRowQueryRequest) (*OrderRowQueryResult, error)

	// 订单查询接口
	//    文档: https://union.jd.com/openplatform/api/10419
	OrderQueryResult(*OrderQueryRequest) ([]byte, error)
	// 奖励订单查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/11781
	OrderBonusQueryResult(*OrderBonusQueryRequest) ([]byte, error)
	// 订单行查询接口
	//    文档: https://union.jd.com/openplatform/api/12707
	OrderRowQueryResult(*OrderRowQueryRequest) ([]byte, error)

	// 订单查询接口
	//    文档: https://union.jd.com/openplatform/api/10419
	OrderQueryMap(*OrderQueryRequest) (map[string]interface{}, error)
	// 奖励订单查询接口【申请】
	//    文档: https://union.jd.com/openplatform/api/11781
	OrderBonusQueryMap(*OrderBonusQueryRequest) (map[string]interface{}, error)
	// 订单行查询接口
	//    文档: https://union.jd.com/openplatform/api/12707
	OrderRowQueryMap(*OrderRowQueryRequest) (map[string]interface{}, error)
}

type OrderServiceImpl

type OrderServiceImpl struct {
	// contains filtered or unexported fields
}

func (*OrderServiceImpl) OrderBonusQuery

func (order *OrderServiceImpl) OrderBonusQuery(request *OrderBonusQueryRequest) (*OrderBonusQueryResult, error)

奖励订单查询接口【申请】

文档: https://union.jd.com/openplatform/api/11781

func (*OrderServiceImpl) OrderBonusQueryMap

func (order *OrderServiceImpl) OrderBonusQueryMap(request *OrderBonusQueryRequest) (map[string]interface{}, error)

奖励订单查询接口【申请】

文档: https://union.jd.com/openplatform/api/11781

func (*OrderServiceImpl) OrderBonusQueryResult

func (order *OrderServiceImpl) OrderBonusQueryResult(request *OrderBonusQueryRequest) ([]byte, error)

奖励订单查询接口【申请】

文档: https://union.jd.com/openplatform/api/11781

func (*OrderServiceImpl) OrderQuery

func (order *OrderServiceImpl) OrderQuery(request *OrderQueryRequest) (*OrderQueryResult, error)

订单查询接口

文档: https://union.jd.com/openplatform/api/10419

func (*OrderServiceImpl) OrderQueryMap

func (order *OrderServiceImpl) OrderQueryMap(request *OrderQueryRequest) (map[string]interface{}, error)

订单查询接口

文档: https://union.jd.com/openplatform/api/10419

func (*OrderServiceImpl) OrderQueryResult

func (order *OrderServiceImpl) OrderQueryResult(request *OrderQueryRequest) ([]byte, error)

订单查询接口

文档: https://union.jd.com/openplatform/api/10419

func (*OrderServiceImpl) OrderRowQuery

func (order *OrderServiceImpl) OrderRowQuery(request *OrderRowQueryRequest) (*OrderRowQueryResult, error)

订单行查询接口

文档: https://union.jd.com/openplatform/api/12707

func (*OrderServiceImpl) OrderRowQueryMap

func (order *OrderServiceImpl) OrderRowQueryMap(request *OrderRowQueryRequest) (map[string]interface{}, error)

订单行查询接口

文档: https://union.jd.com/openplatform/api/12707

func (*OrderServiceImpl) OrderRowQueryResult

func (order *OrderServiceImpl) OrderRowQueryResult(request *OrderRowQueryRequest) ([]byte, error)

订单行查询接口

文档: https://union.jd.com/openplatform/api/12707

type OtherService deprecated

type OtherService interface {
	// 查询推广位【申请】
	// Deprecated: 使用新接口: PositionService.PositionQuery
	//    文档: https://union.jd.com/openplatform/api/10428
	PositionQuery(*PositionQueryRequest) (*PositionQueryResult, error)
	// 创建推广位【申请】
	// Deprecated: 使用新接口: PositionService.PositionCreate
	//    文档: https://union.jd.com/openplatform/api/10429
	PositionCreate(*PositionCreateRequest) (*PositionCreateResult, error)
	// 获取PID【申请】
	// Deprecated: 使用新接口: PositionService.UserPidGet
	//    文档: https://union.jd.com/openplatform/api/10430
	UserPidGet(*UserPidGetRequest) (*UserPidGetResult, error)
	// 活动查询接口
	// Deprecated: 使用新接口: ActivityService.ActivityQuery
	//    文档: https://union.jd.com/openplatform/api/12667
	ActivityQuery(*ActivityQueryRequest) (*ActivityQueryResult, error)
	// 京享红包效果数据
	// Deprecated: 使用新接口: ActivityService.StatisticsRedpacketQuery
	//    文档: https://union.jd.com/openplatform/api/14416
	StatisticsRedpacketQuery(*StatisticsRedpacketQueryRequest) (*StatisticsRedpacketQueryResult, error)

	// 查询推广位【申请】
	// Deprecated: 使用新接口: PositionService.PositionQueryResult
	//    文档: https://union.jd.com/openplatform/api/10428
	PositionQueryResult(*PositionQueryRequest) ([]byte, error)
	// 创建推广位【申请】
	// Deprecated: 使用新接口: PositionService.PositionCreateResult
	//    文档: https://union.jd.com/openplatform/api/10429
	PositionCreateResult(*PositionCreateRequest) ([]byte, error)
	// 获取PID【申请】
	// Deprecated: 使用新接口: PositionService.UserPidGetResult
	//    文档: https://union.jd.com/openplatform/api/10430
	UserPidGetResult(*UserPidGetRequest) ([]byte, error)
	// 活动查询接口
	// Deprecated: 使用新接口: ActivityService.ActivityQueryResult
	//    文档: https://union.jd.com/openplatform/api/12667
	ActivityQueryResult(request *ActivityQueryRequest) ([]byte, error)
	// 京享红包效果数据
	// Deprecated: 使用新接口: ActivityService.StatisticsRedpacketQueryResult
	//    文档: https://union.jd.com/openplatform/api/14416
	StatisticsRedpacketQueryResult(request *StatisticsRedpacketQueryRequest) ([]byte, error)

	// 查询推广位【申请】
	// Deprecated: 使用新接口: PositionService.PositionQueryMap
	//    文档: https://union.jd.com/openplatform/api/10428
	PositionQueryMap(*PositionQueryRequest) (map[string]interface{}, error)
	// 创建推广位【申请】
	// Deprecated: 使用新接口: PositionService.PositionCreateMap
	//    文档: https://union.jd.com/openplatform/api/10429
	PositionCreateMap(*PositionCreateRequest) (map[string]interface{}, error)
	// 获取PID【申请】
	// Deprecated: 使用新接口: PositionService.UserPidGetMap
	//    文档: https://union.jd.com/openplatform/api/10430
	UserPidGetMap(*UserPidGetRequest) (map[string]interface{}, error)
	// 活动查询接口
	// Deprecated: 使用新接口: ActivityService.ActivityQueryMap
	//    文档: https://union.jd.com/openplatform/api/12667
	ActivityQueryMap(request *ActivityQueryRequest) (map[string]interface{}, error)
	// 京享红包效果数据
	// Deprecated: 使用新接口: ActivityService.StatisticsRedpacketQueryMap
	//    文档: https://union.jd.com/openplatform/api/14416
	StatisticsRedpacketQueryMap(request *StatisticsRedpacketQueryRequest) (map[string]interface{}, error)
}

Deprecated: 使用新接口: PositionService 和 ActivityService

type OtherServiceImpl deprecated

type OtherServiceImpl struct {
	// contains filtered or unexported fields
}

Deprecated: 使用新接口: OtherServiceImpl 和 ActivityServiceImpl

func (*OtherServiceImpl) ActivityQuery

func (oth *OtherServiceImpl) ActivityQuery(request *ActivityQueryRequest) (*ActivityQueryResult, error)

活动查询接口 Deprecated: 使用新接口: ActivityService.ActivityQuery

文档: https://union.jd.com/openplatform/api/12667

func (*OtherServiceImpl) ActivityQueryMap

func (oth *OtherServiceImpl) ActivityQueryMap(request *ActivityQueryRequest) (map[string]interface{}, error)

活动查询接口 Deprecated: 使用新接口: ActivityService.ActivityQueryMap

文档: https://union.jd.com/openplatform/api/12667

func (*OtherServiceImpl) ActivityQueryResult

func (oth *OtherServiceImpl) ActivityQueryResult(request *ActivityQueryRequest) ([]byte, error)

活动查询接口 Deprecated: 使用新接口: ActivityService.ActivityQueryResult

文档: https://union.jd.com/openplatform/api/12667

func (*OtherServiceImpl) PositionCreate

func (oth *OtherServiceImpl) PositionCreate(request *PositionCreateRequest) (*PositionCreateResult, error)

创建推广位【申请】 Deprecated: 使用新接口: PositionService.PositionCreate

文档: https://union.jd.com/openplatform/api/10429

func (*OtherServiceImpl) PositionCreateMap

func (oth *OtherServiceImpl) PositionCreateMap(request *PositionCreateRequest) (map[string]interface{}, error)

创建推广位【申请】 Deprecated: 使用新接口: PositionService.PositionCreateMap

文档: https://union.jd.com/openplatform/api/10429

func (*OtherServiceImpl) PositionCreateResult

func (oth *OtherServiceImpl) PositionCreateResult(request *PositionCreateRequest) ([]byte, error)

创建推广位【申请】 Deprecated: 使用新接口: PositionService.PositionCreateResult

文档: https://union.jd.com/openplatform/api/10429

func (*OtherServiceImpl) PositionQuery

func (oth *OtherServiceImpl) PositionQuery(request *PositionQueryRequest) (*PositionQueryResult, error)

查询推广位【申请】 Deprecated: 使用新接口: PositionService.PositionQuery

文档: https://union.jd.com/openplatform/api/10428

func (*OtherServiceImpl) PositionQueryMap

func (oth *OtherServiceImpl) PositionQueryMap(request *PositionQueryRequest) (map[string]interface{}, error)

查询推广位【申请】 Deprecated: 使用新接口: PositionService.PositionQueryMap

文档: https://union.jd.com/openplatform/api/10428

func (*OtherServiceImpl) PositionQueryResult

func (oth *OtherServiceImpl) PositionQueryResult(request *PositionQueryRequest) ([]byte, error)

查询推广位【申请】 Deprecated: 使用新接口: PositionService.PositionQueryResult

文档: https://union.jd.com/openplatform/api/10428

func (*OtherServiceImpl) StatisticsRedpacketQuery

func (oth *OtherServiceImpl) StatisticsRedpacketQuery(request *StatisticsRedpacketQueryRequest) (*StatisticsRedpacketQueryResult, error)

京享红包效果数据 Deprecated: 使用新接口: ActivityService.StatisticsRedpacketQuery

文档: https://union.jd.com/openplatform/api/14416

func (*OtherServiceImpl) StatisticsRedpacketQueryMap

func (oth *OtherServiceImpl) StatisticsRedpacketQueryMap(request *StatisticsRedpacketQueryRequest) (map[string]interface{}, error)

京享红包效果数据 Deprecated: 使用新接口: ActivityService.StatisticsRedpacketQueryMap

文档: https://union.jd.com/openplatform/api/14416

func (*OtherServiceImpl) StatisticsRedpacketQueryResult

func (oth *OtherServiceImpl) StatisticsRedpacketQueryResult(request *StatisticsRedpacketQueryRequest) ([]byte, error)

京享红包效果数据 Deprecated: 使用新接口: ActivityService.StatisticsRedpacketQueryResult

文档: https://union.jd.com/openplatform/api/14416

func (*OtherServiceImpl) UserPidGet

func (oth *OtherServiceImpl) UserPidGet(request *UserPidGetRequest) (*UserPidGetResult, error)

获取PID【申请】 Deprecated: 使用新接口: PositionService.UserPidGet

文档: https://union.jd.com/openplatform/api/10430

func (*OtherServiceImpl) UserPidGetMap

func (oth *OtherServiceImpl) UserPidGetMap(request *UserPidGetRequest) (map[string]interface{}, error)

获取PID【申请】 Deprecated: 使用新接口: PositionService.UserPidGetMap

文档: https://union.jd.com/openplatform/api/10430

func (*OtherServiceImpl) UserPidGetResult

func (oth *OtherServiceImpl) UserPidGetResult(request *UserPidGetRequest) ([]byte, error)

获取PID【申请】 Deprecated: 使用新接口: PositionService.UserPidGetResult

文档: https://union.jd.com/openplatform/api/10430

type Param

type Param struct {
	Method       Method `json:"method" url:"method"`                                           // API接口名称
	AppKey       string `json:"app_key" url:"app_key"`                                         // 分配给应用的AppKey
	AccessToken  string `json:"access_token,omitempty" url:"access_token"`                     // Oauth2颁发的动态令牌,根据API属性标签,如果需要授权,则此参数必传;如果不需要授权,则此参数不需要传
	Timestamp    string `json:"timestamp" url:"timestamp"`                                     // 时间戳,格式为yyyy-MM-dd  HH:mm:ss,时区为GMT+8。API服务端允许客户端请求最大时间误差为10分钟
	Format       string `json:"format" url:"format"`                                           // 响应格式。暂时只支持json
	Version      string `json:"v" url:"v"`                                                     // API协议版本,可选值:2.0,请根据API具体版本号传入此参数,一般为1.0
	SignMethod   string `json:"sign_method" url:"sign_method"`                                 // 签名的摘要算法, md5
	Sign         string `json:"sign" url:"sign"`                                               // API输入参数签名结果
	ParamJson    string `json:"param_json,omitempty" url:"param_json,omitempty"`               // 业务参数
	BuyParamJson string `json:"360buy_param_json,omitempty" url:"360buy_param_json,omitempty"` // 业务参数
}

参数封装,用于请求

func NewParam

func NewParam(param *parameter) *Param

type PositionCreateRequest

type PositionCreateRequest struct {
	UnionId       uint64   `json:"unionId"`       // 需要查询的目标联盟id
	Key           string   `json:"key"`           // 推客unionid对应的“授权Key”,在联盟官网-我的工具-我的API中查询,授权Key具有唯一性,有效期365天,删除或创建新的授权Key后原有的授权Key自动失效
	UnionType     uint64   `json:"unionType"`     // 3:私域推广位,上限5000个,不在联盟后台展示,无对应 PID;4:联盟后台推广位,上限500个,会在推客联盟后台展示,可用于内容平台推广
	Type          uint64   `json:"type"`          // 站点类型 1.网站推广位2.APP推广位3.导购媒体推广位4.聊天工具推广位
	SpaceNameList []string `json:"spaceNameList"` // 推广位名称集合,英文,分割;上限50

	SiteId uint64 `json:"siteId,omitempty"` // 站点ID:网站的ID/app ID/snsID 。当type非4(聊天工具)时,siteId必填
}

func (PositionCreateRequest) Method

func (m PositionCreateRequest) Method() string

func (PositionCreateRequest) Params

func (m PositionCreateRequest) Params() cmap.CMap

type PositionCreateResult

type PositionCreateResult struct {
	BaseResult
	JdUnionOpenPositionCreateResponse UnionResult     `json:"jd_union_open_position_create_response"`
	JdUnionOpenPositionCreateResponce JosCreateResult `json:"jd_union_open_position_create_responce"`
}

func (*PositionCreateResult) Error

func (r *PositionCreateResult) Error() string

func (*PositionCreateResult) GetResult

func (r *PositionCreateResult) GetResult() []byte

func (*PositionCreateResult) String

func (r *PositionCreateResult) String() string

type PositionQueryRequest

type PositionQueryRequest struct {
	UnionId   uint64 `json:"unionId"`   // 需要查询的目标联盟id
	Key       string `json:"key"`       // 推客unionid对应的“授权Key”,在联盟官网-我的工具-我的API中查询,授权Key具有唯一性,有效期365天,删除或创建新的授权Key后原有的授权Key自动失效
	UnionType uint64 `json:"unionType"` // 3:私域推广位,上限5000个,不在联盟后台展示,无对应 PID;4:联盟后台推广位,上限500个,会在推客联盟后台展示,可用于内容平台推广
	PageIndex uint64 `json:"pageIndex"` // 页码,上限100
	PageSize  uint64 `json:"pageSize"`  // 每页条数,上限100
}

func (PositionQueryRequest) Method

func (m PositionQueryRequest) Method() string

func (PositionQueryRequest) Params

func (m PositionQueryRequest) Params() cmap.CMap

type PositionQueryResult

type PositionQueryResult struct {
	BaseResult
	JdUnionOpenPositionQueryResponse UnionResult    `json:"jd_union_open_position_query_response"`
	JdUnionOpenPositionQueryResponce JosQueryResult `json:"jd_union_open_position_query_responce"`
}

func (*PositionQueryResult) Error

func (r *PositionQueryResult) Error() string

func (*PositionQueryResult) GetResult

func (r *PositionQueryResult) GetResult() []byte

func (*PositionQueryResult) String

func (r *PositionQueryResult) String() string

type PositionService

type PositionService interface {
	// 查询推广位【申请】
	//    文档: https://union.jd.com/openplatform/api/10428
	PositionQuery(*PositionQueryRequest) (*PositionQueryResult, error)
	// 创建推广位【申请】
	//    文档: https://union.jd.com/openplatform/api/10429
	PositionCreate(*PositionCreateRequest) (*PositionCreateResult, error)
	// 获取PID【申请】
	// 此接口属于版本: 1.1
	//    文档: https://union.jd.com/openplatform/api/10430
	UserPidGet(*UserPidGetRequest) (*UserPidGetResult, error)

	// 查询推广位【申请】
	//    文档: https://union.jd.com/openplatform/api/10428
	PositionQueryResult(*PositionQueryRequest) ([]byte, error)
	// 创建推广位【申请】
	//    文档: https://union.jd.com/openplatform/api/10429
	PositionCreateResult(*PositionCreateRequest) ([]byte, error)
	// 获取PID【申请】
	//    文档: https://union.jd.com/openplatform/api/10430
	UserPidGetResult(*UserPidGetRequest) ([]byte, error)

	// 查询推广位【申请】
	//    文档: https://union.jd.com/openplatform/api/10428
	PositionQueryMap(*PositionQueryRequest) (map[string]interface{}, error)
	// 创建推广位【申请】
	//    文档: https://union.jd.com/openplatform/api/10429
	PositionCreateMap(*PositionCreateRequest) (map[string]interface{}, error)
	// 获取PID【申请】
	//    文档: https://union.jd.com/openplatform/api/10430
	UserPidGetMap(*UserPidGetRequest) (map[string]interface{}, error)
}

type PositionServiceImpl

type PositionServiceImpl struct {
	// contains filtered or unexported fields
}

func (*PositionServiceImpl) PositionCreate

func (pos *PositionServiceImpl) PositionCreate(request *PositionCreateRequest) (*PositionCreateResult, error)

创建推广位【申请】

文档: https://union.jd.com/openplatform/api/10429

func (*PositionServiceImpl) PositionCreateMap

func (pos *PositionServiceImpl) PositionCreateMap(request *PositionCreateRequest) (map[string]interface{}, error)

创建推广位【申请】

文档: https://union.jd.com/openplatform/api/10429

func (*PositionServiceImpl) PositionCreateResult

func (pos *PositionServiceImpl) PositionCreateResult(request *PositionCreateRequest) ([]byte, error)

创建推广位【申请】

文档: https://union.jd.com/openplatform/api/10429

func (*PositionServiceImpl) PositionQuery

func (pos *PositionServiceImpl) PositionQuery(request *PositionQueryRequest) (*PositionQueryResult, error)

查询推广位【申请】

文档: https://union.jd.com/openplatform/api/10428

func (*PositionServiceImpl) PositionQueryMap

func (pos *PositionServiceImpl) PositionQueryMap(request *PositionQueryRequest) (map[string]interface{}, error)

查询推广位【申请】

文档: https://union.jd.com/openplatform/api/10428

func (*PositionServiceImpl) PositionQueryResult

func (pos *PositionServiceImpl) PositionQueryResult(request *PositionQueryRequest) ([]byte, error)

查询推广位【申请】

文档: https://union.jd.com/openplatform/api/10428

func (*PositionServiceImpl) UserPidGet

func (pos *PositionServiceImpl) UserPidGet(request *UserPidGetRequest) (*UserPidGetResult, error)

获取PID【申请】 此接口在版本1.1才有

文档: https://union.jd.com/openplatform/api/10430

func (*PositionServiceImpl) UserPidGetMap

func (pos *PositionServiceImpl) UserPidGetMap(request *UserPidGetRequest) (map[string]interface{}, error)

获取PID【申请】

文档: https://union.jd.com/openplatform/api/10430

func (*PositionServiceImpl) UserPidGetResult

func (pos *PositionServiceImpl) UserPidGetResult(request *UserPidGetRequest) ([]byte, error)

获取PID【申请】

文档: https://union.jd.com/openplatform/api/10430

type PromoteCommonGetRequest

type PromoteCommonGetRequest struct {
	MaterialId string `json:"materialId"` //	推广物料url,例如活动链接、商品链接等;不支持仅传入skuid
	SiteId     string `json:"siteId"`     // 网站ID/APP ID,入口:京东联盟-推广管理-网站管理/APP管理-查看网站ID/APP ID(1、接口禁止使用导购媒体id入参;2、投放链接的网址或应用必须与传入的网站ID/AppID备案一致,否则订单会判“无效-来源与备案网址不符”)

	PositionId    uint64 `json:"positionId,omitempty"`    // 推广位id
	SubUnionId    string `json:"subUnionId,omitempty"`    // 子渠道标识,您可自定义传入字母、数字或下划线,最多支持80个字符,该参数会在订单行查询接口中展示(需申请权限,申请方法请见https://union.jd.com/helpcenter/13246-13247-46301
	Ext1          string `json:"ext1,omitempty"`          // 系统扩展参数(需申请权限,申请方法请见https://union.jd.com/helpcenter/13246-13247-46301),最多支持40字符,参数会在订单行查询接口中展示
	Protocol      uint64 `json:"-"`                       // Deprecated:【已废弃】请勿再使用
	Pid           string `json:"pid,omitempty"`           // 联盟子推客身份标识(不能传入接口调用者自己的pid)
	CouponUrl     string `json:"couponUrl,omitempty"`     // 优惠券领取链接,在使用优惠券、商品二合一功能时入参,且materialId须为商品详情页链接
	GiftCouponKey string `json:"giftCouponKey,omitempty"` // 礼金批次号
}

func (PromoteCommonGetRequest) Method

func (m PromoteCommonGetRequest) Method() string

func (PromoteCommonGetRequest) Params

func (m PromoteCommonGetRequest) Params() cmap.CMap

type PromoteCommonGetResult

type PromoteCommonGetResult struct {
	BaseResult
	JdUnionOpenPromoteCommonGetResponse UnionResult  `json:"jd_union_open_promotion_common_get_response"`
	JdUnionOpenPromoteCommonGetResponce JosGetResult `json:"jd_union_open_promote_common_get_responce"`
}

func (*PromoteCommonGetResult) Error

func (r *PromoteCommonGetResult) Error() string

func (*PromoteCommonGetResult) GetResult

func (r *PromoteCommonGetResult) GetResult() []byte

func (*PromoteCommonGetResult) String

func (r *PromoteCommonGetResult) String() string

type PromotionAppletGetRequest

type PromotionAppletGetRequest struct {
	Type uint64 `json:"type"` // 爆款小程序

	SubUnionId   string `json:"sub_union_id,omitempty"`  // 子联盟ID(需要联系运营开通权限才能拿到数据)
	PositionId   uint64 `json:"position_id,omitempty"`   // 推广位ID
	Pid          string `json:"pid,omitempty"`           // 子帐号身份标识,格式为子站长ID_子站长网站ID_子站长推广位ID
	ActivityType uint64 `json:"activity_type,omitempty"` // 活动落地页类型,1:新人优惠券、2:新人专享价、3:商品推荐集合页,默认1
}

func (PromotionAppletGetRequest) Method

func (m PromotionAppletGetRequest) Method() string

func (PromotionAppletGetRequest) Params

func (m PromotionAppletGetRequest) Params() cmap.CMap

type PromotionAppletGetResult

type PromotionAppletGetResult struct {
	BaseResult
	JdUnionOpenPromotionAppletGetResponse UnionResult  `json:"jd_union_open_promotion_applet_get_response"`
	JdUnionOpenPromotionAppletGetResponce JosGetResult `json:"jd_union_open_promotion_applet_get_responce"`
}

func (*PromotionAppletGetResult) Error

func (r *PromotionAppletGetResult) Error() string

func (*PromotionAppletGetResult) GetResult

func (r *PromotionAppletGetResult) GetResult() []byte

func (*PromotionAppletGetResult) String

func (r *PromotionAppletGetResult) String() string

type PromotionBysubunionidGetRequest

type PromotionBysubunionidGetRequest struct {
	MaterialId string `json:"materialId"` // 推广物料url,例如活动链接、商品链接等;不支持仅传入skuid

	SubUnionId    string `json:"subUnionId,omitempty"`    // 子渠道标识,您可自定义传入字母、数字或下划线,最多支持80个字符,该参数会在订单行查询接口中展示(需申请权限,申请方法请见https://union.jd.com/helpcenter/13246-13247-46301
	PositionId    uint64 `json:"positionId,omitempty"`    // 推广位ID
	Pid           string `json:"pid,omitempty"`           // 联盟子推客身份标识(不能传入接口调用者自己的pid)
	CouponUrl     string `json:"couponUrl,omitempty"`     // 优惠券领取链接,在使用优惠券、商品二合一功能时入参,且materialId须为商品详情页链接
	ChainType     uint64 `json:"chainType,omitempty"`     // 转链类型,1:长链, 2 :短链 ,3: 长链+短链,默认短链,短链有效期60天
	GiftCouponKey string `json:"giftCouponKey,omitempty"` // 礼金批次号
}

func (PromotionBysubunionidGetRequest) Method

func (PromotionBysubunionidGetRequest) Params

type PromotionBysubunionidGetResult

type PromotionBysubunionidGetResult struct {
	BaseResult
	JdUnionOpenPromotionBysubunionidGetResponse UnionResult  `json:"jd_union_open_promotion_bysubunionid_get_response"`
	JdUnionOpenPromotionBysubunionidGetResponce JosGetResult `json:"jd_union_open_promotion_bysubunionid_get_responce"`
}

func (*PromotionBysubunionidGetResult) Error

func (*PromotionBysubunionidGetResult) GetResult

func (r *PromotionBysubunionidGetResult) GetResult() []byte

func (*PromotionBysubunionidGetResult) String

type PromotionByunionidGetRequest

type PromotionByunionidGetRequest struct {
	MaterialId string `json:"materialId"` // 推广物料url,例如活动链接、商品链接等;不支持仅传入skuid
	UnionId    uint64 `json:"unionId"`    // 目标推客的联盟ID

	PositionId uint64 `json:"positionId,omitempty"` // 新增推广位id (不填的话,为其默认生成一个唯一此接口推广位-名称:微信手Q短链接)
	Pid        string `json:"pid,omitempty"`        // 联盟子推客身份标识(不能传入接口调用者自己的pid)
	CouponUrl  string `json:"couponUrl,omitempty"`  // 优惠券领取链接,在使用优惠券、商品二合一功能时入参,且materialId须为商品详情页链接
	SubUnionId string `json:"subUnionId,omitempty"` // 子渠道标识,您可自定义传入字母、数字或下划线,最多支持80个字符,该参数会在订单行查询接口中展示(需申请权限,申请方法请见https://union.jd.com/helpcenter/13246-13247-46301
	ChainType  uint64 `json:"chainType,omitempty"`  // 转链类型,1:长链, 2 :短链 ,3: 长链+短链,默认短链,短链有效期60天
}

func (PromotionByunionidGetRequest) Method

func (PromotionByunionidGetRequest) Params

type PromotionByunionidGetResult

type PromotionByunionidGetResult struct {
	BaseResult
	JdUnionOpenPromotionBysubunionidGetResponse UnionResult  `json:"jd_union_open_promotion_bysubunionid_get_response"`
	JdUnionOpenPromotionBysubunionidGetResponce JosGetResult `json:"jd_union_open_promotion_bysubunionid_get_responce"`
}

func (*PromotionByunionidGetResult) Error

func (*PromotionByunionidGetResult) GetResult

func (r *PromotionByunionidGetResult) GetResult() []byte

func (*PromotionByunionidGetResult) String

func (r *PromotionByunionidGetResult) String() string

type PromotionService

type PromotionService interface {
	// 网站/APP获取推广链接接口
	//    文档: https://union.jd.com/openplatform/api/10421
	PromotionCommonGet(*PromoteCommonGetRequest) (*PromoteCommonGetResult, error)
	// 社交媒体获取推广链接接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10424
	PromotionBysubunionidGet(*PromotionBysubunionidGetRequest) (*PromotionBysubunionidGetResult, error)
	// 工具商获取推广链接接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10425
	PromotionByunionidGet(*PromotionByunionidGetRequest) (*PromotionByunionidGetResult, error)
	// 通过小程序获取推广链接【申请】
	//    文档: https://union.jd.com/openplatform/api/11793
	PromotionAppletGet(request *PromotionAppletGetRequest) (*PromotionAppletGetResult, error)

	// 网站/APP获取推广链接接口
	//    文档: https://union.jd.com/openplatform/api/10421
	PromotionCommonGetResult(*PromoteCommonGetRequest) ([]byte, error)
	// 社交媒体获取推广链接接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10424
	PromotionBysubunionidGetResult(*PromotionBysubunionidGetRequest) ([]byte, error)
	// 工具商获取推广链接接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10425
	PromotionByunionidGetResult(*PromotionByunionidGetRequest) ([]byte, error)
	// 通过小程序获取推广链接【申请】
	//    文档: https://union.jd.com/openplatform/api/11793
	PromotionAppletGetResult(request *PromotionAppletGetRequest) ([]byte, error)

	// 网站/APP获取推广链接接口
	//    文档: https://union.jd.com/openplatform/api/10421
	PromotionCommonGetMap(*PromoteCommonGetRequest) (map[string]interface{}, error)
	// 社交媒体获取推广链接接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10424
	PromotionBysubunionidGetMap(*PromotionBysubunionidGetRequest) (map[string]interface{}, error)
	// 工具商获取推广链接接口【申请】
	//    文档: https://union.jd.com/openplatform/api/10425
	PromotionByunionidGetMap(*PromotionByunionidGetRequest) (map[string]interface{}, error)
	// 通过小程序获取推广链接【申请】
	//    文档: https://union.jd.com/openplatform/api/11793
	PromotionAppletGetMap(request *PromotionAppletGetRequest) (map[string]interface{}, error)
}

type PromotionServiceImpl

type PromotionServiceImpl struct {
	// contains filtered or unexported fields
}

func (*PromotionServiceImpl) PromotionAppletGet

func (promo *PromotionServiceImpl) PromotionAppletGet(request *PromotionAppletGetRequest) (*PromotionAppletGetResult, error)

通过小程序获取推广链接【申请】

文档: https://union.jd.com/openplatform/api/11793

func (*PromotionServiceImpl) PromotionAppletGetMap

func (promo *PromotionServiceImpl) PromotionAppletGetMap(request *PromotionAppletGetRequest) (map[string]interface{}, error)

通过小程序获取推广链接【申请】

文档: https://union.jd.com/openplatform/api/11793

func (*PromotionServiceImpl) PromotionAppletGetResult

func (promo *PromotionServiceImpl) PromotionAppletGetResult(request *PromotionAppletGetRequest) ([]byte, error)

通过小程序获取推广链接【申请】

文档: https://union.jd.com/openplatform/api/11793

func (*PromotionServiceImpl) PromotionBysubunionidGet

func (promo *PromotionServiceImpl) PromotionBysubunionidGet(request *PromotionBysubunionidGetRequest) (*PromotionBysubunionidGetResult, error)

社交媒体获取推广链接接口【申请】

文档: https://union.jd.com/openplatform/api/10424

func (*PromotionServiceImpl) PromotionBysubunionidGetMap

func (promo *PromotionServiceImpl) PromotionBysubunionidGetMap(request *PromotionBysubunionidGetRequest) (map[string]interface{}, error)

社交媒体获取推广链接接口【申请】

文档: https://union.jd.com/openplatform/api/10424

func (*PromotionServiceImpl) PromotionBysubunionidGetResult

func (promo *PromotionServiceImpl) PromotionBysubunionidGetResult(request *PromotionBysubunionidGetRequest) ([]byte, error)

社交媒体获取推广链接接口【申请】

文档: https://union.jd.com/openplatform/api/10424

func (*PromotionServiceImpl) PromotionByunionidGet

func (promo *PromotionServiceImpl) PromotionByunionidGet(request *PromotionByunionidGetRequest) (*PromotionByunionidGetResult, error)

工具商获取推广链接接口【申请】

文档: https://union.jd.com/openplatform/api/10425

func (*PromotionServiceImpl) PromotionByunionidGetMap

func (promo *PromotionServiceImpl) PromotionByunionidGetMap(request *PromotionByunionidGetRequest) (map[string]interface{}, error)

工具商获取推广链接接口【申请】

文档: https://union.jd.com/openplatform/api/10425

func (*PromotionServiceImpl) PromotionByunionidGetResult

func (promo *PromotionServiceImpl) PromotionByunionidGetResult(request *PromotionByunionidGetRequest) ([]byte, error)

工具商获取推广链接接口【申请】

文档: https://union.jd.com/openplatform/api/10425

func (*PromotionServiceImpl) PromotionCommonGet

func (promo *PromotionServiceImpl) PromotionCommonGet(request *PromoteCommonGetRequest) (*PromoteCommonGetResult, error)

网站/APP获取推广链接接口

文档: https://union.jd.com/openplatform/api/10421

func (*PromotionServiceImpl) PromotionCommonGetMap

func (promo *PromotionServiceImpl) PromotionCommonGetMap(request *PromoteCommonGetRequest) (map[string]interface{}, error)

网站/APP获取推广链接接口

文档: https://union.jd.com/openplatform/api/10421

func (*PromotionServiceImpl) PromotionCommonGetResult

func (promo *PromotionServiceImpl) PromotionCommonGetResult(request *PromoteCommonGetRequest) ([]byte, error)

网站/APP获取推广链接接口

文档: https://union.jd.com/openplatform/api/10421

type ResponseKey

type ResponseKey string
const (
	GoodsJingfenQueryResponse            ResponseKey = "jd_union_open_goods_jingfen_query_response"            // 精选商品查询
	GoodsQueryResponse                   ResponseKey = "jd_union_open_goods_query_response"                    // 关键词商品查询接口【申请】
	GoodsPromotiongoodsinfoQueryResponse ResponseKey = "jd_union_open_goods_promotiongoodsinfo_query_response" // 根据skuid查询商品信息接口
	CategoryGoodsGetResponse             ResponseKey = "jd_union_open_category_goods_get_response"             // 商品类目查询接口
	GoodsGigfieldQueryResponse           ResponseKey = "jd_union_open_goods_bigfield_query_response"           // 商品详情查询接口【申请】
)
const (
	GoodsJingfenQueryResponce            ResponseKey = "jd_union_open_goods_jingfen_query_responce"            // 精选商品查询
	GoodsQueryResponce                   ResponseKey = "jd_union_open_goods_query_responce"                    // 关键词商品查询接口【申请】
	GoodsPromotiongoodsinfoQueryResponce ResponseKey = "jd_union_open_goods_promotiongoodsinfo_query_responce" // 根据skuid查询商品信息接口
	CategoryGoodsGetResponce             ResponseKey = "jd_union_open_category_goods_get_responce"             // 商品类目查询接口
	GoodsGigfieldQueryResponce           ResponseKey = "jd_union_open_goods_bigfield_query_responce"           // 商品详情查询接口【申请】
)
const (
	PromotionCommonGetResponse       ResponseKey = "jd_union_open_promotion_common_get_response"       // 网站/APP获取推广链接接口
	PromotionBysubunionidGetResponse ResponseKey = "jd_union_open_promotion_bysubunionid_get_response" // 社交媒体获取推广链接接口【申请】
	PromotionByunionidGetResponse    ResponseKey = "jd_union_open_promotion_byunionid_get_response"    // 工具商获取推广链接接口【申请】
	PromotionAppletGetResponse       ResponseKey = "jd_union_open_promotion_applet_get_response"       // 通过小程序获取推广链接【申请】
)
const (
	PromotionCommonGetResponce       ResponseKey = "jd_union_open_promotion_common_get_responce"       // 网站/APP获取推广链接接口
	PromotionBysubunionidGetResponce ResponseKey = "jd_union_open_promotion_bysubunionid_get_responce" // 社交媒体获取推广链接接口【申请】
	PromotionByunionidGetResponce    ResponseKey = "jd_union_open_promotion_byunionid_get_responce"    // 工具商获取推广链接接口【申请】
	PromotionAppletGetResponce       ResponseKey = "jd_union_open_promotion_applet_get_responce"       // 通过小程序获取推广链接【申请】
)
const (
	OrderQueryResponse      ResponseKey = "jd_union_open_order_query_response"       // 订单查询接口
	OrderBonusQueryResponse ResponseKey = "jd_union_open_order_bonus_query_response" // 奖励订单查询接口【申请】
	OrderRowQueryResponse   ResponseKey = "jd_union_open_order_row_query_response"   // 订单行查询接口
)
const (
	OrderQueryResponce      ResponseKey = "jd_union_open_order_query_responce"       // 订单查询接口
	OrderBonusQueryResponce ResponseKey = "jd_union_open_order_bonus_query_responce" // 奖励订单查询接口【申请】
	OrderRowQueryResponce   ResponseKey = "jd_union_open_order_row_query_responce"   // 订单行查询接口
)
const (
	PositionQueryResponse  ResponseKey = "jd_union_open_position_query_response"  // 查询推广位【申请】
	PositionCreateResponse ResponseKey = "jd_union_open_position_create_response" // 创建推广位【申请】
	UserPidGetResponse     ResponseKey = "jd_union_open_user_pid_get_response"    // 获取PID【申请】
)
const (
	PositionQueryResponce  ResponseKey = "jd_union_open_position_query_responce"  // 查询推广位【申请】
	PositionCreateResponce ResponseKey = "jd_union_open_position_create_responce" // 创建推广位【申请】
	UserPidGetResponce     ResponseKey = "jd_union_open_user_pid_get_responce"    // 获取PID【申请】
)
const (
	CouponGiftStopResponse           ResponseKey = "jd_union_open_coupon_gift_stop_response"            // 礼金停止
	CouponGiftGetResponse            ResponseKey = "jd_union_open_coupon_gift_get_response"             // 礼金创建
	StatisticGiftCouponQueryResponse ResponseKey = "jd_union_open_statistics_giftcoupon_query_response" // 礼金效果数据
)
const (
	CouponGiftStopResponce           ResponseKey = "jd_union_open_coupon_gift_stop_responce"            // 礼金停止
	CouponGiftGetResponce            ResponseKey = "jd_union_open_coupon_gift_get_responce"             // 礼金创建
	StatisticGiftCouponQueryResponce ResponseKey = "jd_union_open_statistics_giftcoupon_query_responce" // 礼金效果数据
)
const (
	ActivityQueryResponse            ResponseKey = "jd_union_open_activity_query_response"             // 活动查询接口
	StatisticsRedpacketQueryResponse ResponseKey = "jd_union_open_statistics_redpacket_query_response" // 京享红包效果数据
)
const (
	ActivityQueryResponce            ResponseKey = "jd_union_open_activity_query_responce"             // 活动查询接口
	StatisticsRedpacketQueryResponce ResponseKey = "jd_union_open_statistics_redpacket_query_responce" // 京享红包效果数据
)
const (
	CouponQueryResponce ResponseKey = "jd_union_open_coupon_query_responce" // 优惠券领取情况查询接口【申请】
)
const (
	CouponQueryResponse ResponseKey = "jd_union_open_coupon_query_response" // 优惠券领取情况查询接口【申请】
)

func (ResponseKey) String

func (m ResponseKey) String() string

type Result

type Result interface {
	error
	String() string
	IsSuccess() bool
	GetResult() []byte
}

type Service

type Service interface {
	common.Service

	// 获取商品相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetGoodsService() GoodsService
	// 获取优惠卷相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetCouponService() CouponService
	// 获取推广相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetPromoteService() PromotionService
	// 获取礼金相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetGiftService() GiftService
	// 获取订单相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetOrderService() OrderService
	// 获取活动相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetActivityService() ActivityService
	// 获取推广位相关接口
	//    文档: https://union.jd.com/openplatform/api
	GetPositionService() PositionService
	// Deprecated: 弃用
	// 获取其他相关接口
	//    文档: https://union.jd.com/openplatform/api
	// 使用新接口: GetPositionService 和 GetActivityService
	GetOtherService() OtherService

	// 设置商品(自定义)相关接口
	SetGoodsService(GoodsService)
	// 设置优惠卷(自定义)相关接口
	SetCouponService(CouponService)
	// 设置推广(自定义)相关接口
	SetPromoteService(PromotionService)
	// 设置礼金(自定义)相关接口
	SetGiftService(GiftService)
	// 设置其他(自定义)相关接口
	SetActivityService(ActivityService)
	// 设置推广位(自定义)相关接口
	SetPositionService(PositionService)
	// 设置订单(自定义)相关接口
	SetOrderService(OrderService)
	// Deprecated: 弃用
	// 设置其他(自定义)相关接口
	// 使用新接口: SetPositionService 和 SetActivityService
	SetOtherService(OtherService)

	// 获取配置
	GetConfig() *Config
	// 设置配置
	SetConfig(config *Config)
	// 设置http请求
	SetHttpService(service common.Service)

	// 获取路由api
	GetRouteApi() string
	// 设置路由api
	SetRouteApi(string)

	// 执行http请求并解析结果
	// v 返回数据解析对象(指针)
	// method 请求路由方法
	// 业务参数
	// Deprecated: 使用新接口: Request
	Do(v interface{}, method Method, param map[string]interface{}) error

	// 执行http请求并解析结果
	// v 返回数据解析对象(指针)
	// method 请求路由方法
	// 业务参数
	// 可通过 Request 方法执行其他未封装的京东联盟API
	Request(v interface{}, param IParam) error

	// 参数校验
	CheckRequiredParameters(v interface{}) error

	// 获取解析正确结果
	GetResult(Result, error) ([]byte, error)
	// 解析并获取正确结果
	ParseResult(map[string]interface{}, ResponseKey) (map[string]interface{}, error)

	// 开启验证等级
	Validate(VCode)
	// 结果为map对象时的解封装等级,默认1
	// 0 不做解析,全部返回
	// 1 解析返回1层
	// 2 解析返回主要数据
	SetMapResultParseLevel(level int)
}

京东联盟API

文档: https://union.jd.com/openplatform/api

func NewJdClient

func NewJdClient(appKey, secretKey, accessToken string) Service

默认京东联盟

func NewJdService

func NewJdService(appKey, secretKey string) Service

默认京东联盟

func NewJdUnionService

func NewJdUnionService(appKey, secretKey, accessToken string) Service

func NewJosService

func NewJosService(appKey, secretKey, accessToken string) Service

type ServiceImpl

type ServiceImpl struct {
	// contains filtered or unexported fields
}

func (*ServiceImpl) CheckRequiredParameters

func (ser *ServiceImpl) CheckRequiredParameters(v interface{}) error

非必填参数为空不会序列化

func (*ServiceImpl) Do deprecated

func (ser *ServiceImpl) Do(v interface{}, method Method, params map[string]interface{}) error

Deprecated: 使用新接口: Request

func (*ServiceImpl) Get

func (ser *ServiceImpl) Get(url string, args interface{}) ([]byte, error)

func (*ServiceImpl) GetActivityService

func (ser *ServiceImpl) GetActivityService() ActivityService

func (*ServiceImpl) GetConfig

func (ser *ServiceImpl) GetConfig() *Config

func (*ServiceImpl) GetCouponService

func (ser *ServiceImpl) GetCouponService() CouponService

func (*ServiceImpl) GetFor

func (ser *ServiceImpl) GetFor(v interface{}, url string, args *Param) error

func (*ServiceImpl) GetGiftService

func (ser *ServiceImpl) GetGiftService() GiftService

func (*ServiceImpl) GetGoodsService

func (ser *ServiceImpl) GetGoodsService() GoodsService

func (*ServiceImpl) GetOrderService

func (ser *ServiceImpl) GetOrderService() OrderService

func (*ServiceImpl) GetOtherService deprecated

func (ser *ServiceImpl) GetOtherService() OtherService

Deprecated: 使用新接口: GetPositionService 和 GetActivityService

func (*ServiceImpl) GetPositionService

func (ser *ServiceImpl) GetPositionService() PositionService

func (*ServiceImpl) GetPromoteService

func (ser *ServiceImpl) GetPromoteService() PromotionService

func (*ServiceImpl) GetResult

func (ser *ServiceImpl) GetResult(res Result, err error) ([]byte, error)

func (*ServiceImpl) GetRouteApi

func (ser *ServiceImpl) GetRouteApi() string

func (*ServiceImpl) ParseResult

func (ser *ServiceImpl) ParseResult(res map[string]interface{}, key ResponseKey) (map[string]interface{}, error)

func (*ServiceImpl) Request

func (ser *ServiceImpl) Request(v interface{}, param IParam) error

func (*ServiceImpl) SetActivityService

func (ser *ServiceImpl) SetActivityService(service ActivityService)

func (*ServiceImpl) SetConfig

func (ser *ServiceImpl) SetConfig(config *Config)

func (*ServiceImpl) SetCouponService

func (ser *ServiceImpl) SetCouponService(service CouponService)

func (*ServiceImpl) SetGiftService

func (ser *ServiceImpl) SetGiftService(service GiftService)

func (*ServiceImpl) SetGoodsService

func (ser *ServiceImpl) SetGoodsService(service GoodsService)

func (*ServiceImpl) SetHttpService

func (ser *ServiceImpl) SetHttpService(service common.Service)

func (*ServiceImpl) SetMapResultParseLevel

func (ser *ServiceImpl) SetMapResultParseLevel(level int)

func (*ServiceImpl) SetOrderService

func (ser *ServiceImpl) SetOrderService(service OrderService)

func (*ServiceImpl) SetOtherService deprecated

func (ser *ServiceImpl) SetOtherService(service OtherService)

Deprecated: 使用新接口: SetPositionService 和 SetActivityService

func (*ServiceImpl) SetPositionService

func (ser *ServiceImpl) SetPositionService(service PositionService)

func (*ServiceImpl) SetPromoteService

func (ser *ServiceImpl) SetPromoteService(service PromotionService)

func (*ServiceImpl) SetRouteApi

func (ser *ServiceImpl) SetRouteApi(api string)

func (*ServiceImpl) Sign

func (ser *ServiceImpl) Sign(method Method, param map[string]interface{}) (*Param, error)

func (*ServiceImpl) Validate

func (ser *ServiceImpl) Validate(code VCode)

type StatisticGiftCouponQueryRequest

type StatisticGiftCouponQueryRequest struct {
	SkuId         uint64 `json:"skuId"`         // 查询该SKU您创建的推客礼金,以及该SKU您可推广的联盟礼金。 skuId和giftCouponKey二选一,不可同时入参。
	GiftCouponKey string `json:"giftCouponKey"` // 根据礼金批次ID精确查询礼金信息,请勿和createTime同时传入。 skuId和giftCouponKey二选一,不可同时入参。
	CreateTime    string `json:"createTime"`    // 可查询此日期及以后创建的礼金,如不传则不限日期。 格式:yyyy-MM-dd
	StartTime     string `json:"startTime"`     // 可查询此日期及以后下单的礼金效果数据,如不传则不限日期。 格式:yyyy-MM-dd
}

func (StatisticGiftCouponQueryRequest) Method

func (StatisticGiftCouponQueryRequest) Params

type StatisticGiftCouponQueryResult

type StatisticGiftCouponQueryResult struct {
	BaseResult
	JdUnionOpenStatisticGiftCouponQueryResponse UnionResult    `json:"jd_union_open_statistics_giftcoupon_query_response"`
	JdUnionOpenStatisticGiftCouponQueryResponce JosQueryResult `json:"jd_union_open_statistics_giftcoupon_query_responce"`
}

func (*StatisticGiftCouponQueryResult) Error

func (*StatisticGiftCouponQueryResult) GetResult

func (r *StatisticGiftCouponQueryResult) GetResult() []byte

func (*StatisticGiftCouponQueryResult) String

type StatisticsRedpacketQueryRequest

type StatisticsRedpacketQueryRequest struct {
	StartDate string `json:"startDate"` // 开始日期yyyy-MM-dd,不可超出最近90天开始日期yyyy-MM-dd,不可超出最近90天
	EndDate   string `json:"endDate"`   // 结束时间yyyy-MM-dd,不可超出最近90天
	PageIndex uint64 `json:"pageIndex"` // 页码,起始1
	PageSize  uint64 `json:"pageSize"`  // 每页数,大于等于10且小于等于100的正整数

	ActId      uint64 `json:"actId,omitempty"`      // 京享红包活动Id,如不传则查询全部京享红包活动
	PositionId uint64 `json:"positionId,omitempty"` // 推广位ID,支持联盟后台推广位和API创建的私域推广位
}

func (StatisticsRedpacketQueryRequest) Method

func (StatisticsRedpacketQueryRequest) Params

type StatisticsRedpacketQueryResult

type StatisticsRedpacketQueryResult struct {
	BaseResult
	JdUnionOpenStatisticsRedpacketQueryResponse UnionResult    `json:"jd_union_open_statistics_redpacket_query_response"`
	JdUnionOpenStatisticsRedpacketQueryResponce JosQueryResult `json:"jd_union_open_statistics_redpacket_query_responce"`
}

func (*StatisticsRedpacketQueryResult) Error

func (*StatisticsRedpacketQueryResult) GetResult

func (r *StatisticsRedpacketQueryResult) GetResult() []byte

func (*StatisticsRedpacketQueryResult) String

type TransferParam

type TransferParam struct {
	// contains filtered or unexported fields
}

用户兼容

func (TransferParam) Method

func (m TransferParam) Method() string

func (TransferParam) Params

func (m TransferParam) Params() cmap.CMap

type UnionResult

type UnionResult struct {
	Code   string `json:"code"`
	Result string `json:"result"`
}

type UserPidGetRequest

type UserPidGetRequest struct {
	UnionId       uint64 `json:"unionId"`       // 联盟ID
	ChildUnionId  uint64 `json:"childUnionId"`  // 子站长ID
	PromotionType uint64 `json:"promotionType"` // 推广类型,1APP推广 2聊天工具推广
	MediaName     string `json:"mediaName"`     // 媒体名称,即子站长的app应用名称,推广方式为app推广时必填,且app名称必须为已存在的app名称

	PositionName string `json:"positionName,omitempty"` // 子站长的推广位名称,如不存在则创建,不填则由联盟根据母账号信息创建
}

func (UserPidGetRequest) Method

func (m UserPidGetRequest) Method() string

func (UserPidGetRequest) Params

func (m UserPidGetRequest) Params() cmap.CMap

type UserPidGetResult

type UserPidGetResult struct {
	BaseResult
	JdUnionOpenUserPidGetResponse UnionResult  `json:"jd_union_open_user_pid_get_response"`
	JdUnionOpenUserPidGetResponce JosGetResult `json:"jd_union_open_user_pid_get_responce"`
}

func (*UserPidGetResult) Error

func (r *UserPidGetResult) Error() string

func (*UserPidGetResult) GetResult

func (r *UserPidGetResult) GetResult() []byte

func (*UserPidGetResult) String

func (r *UserPidGetResult) String() string

type VCode

type VCode int

参数验证/校验等级

const (
	Non VCode = iota // 不校验😅
	NotEmpty
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL