Documentation ¶
Index ¶
- type App
- func (app *App) CommissionIntegralToInt64(GoodsPrice, CouponProportion int64) int64
- func (app *App) CouponAmountToInt64(Commission float64) int64
- func (app *App) CouponProportionToInt64(CommissionShare float64) int64
- func (app *App) GoodsOriginalPriceToInt64(Price float64) int64
- func (app *App) GoodsPriceToInt64(LowestCouponPrice float64) int64
- func (app *App) Sign(p Params)
- func (app *App) UnionOpenGoodsJIngFenQuery(notMustParams ...Params) *UnionOpenGoodsJIngFenQueryResult
- func (app *App) UnionOpenGoodsPromotionGoodsInfoQuery(notMustParams ...Params) *UnionOpenGoodsPromotionGoodsInfoQueryResult
- func (app *App) UnionOpenPromotionCommonGet(notMustParams ...Params) *UnionOpenPromotionCommonGetResult
- type Params
- type UnionOpenGoodsJIngFenQueryQueryResult
- type UnionOpenGoodsJIngFenQueryResult
- type UnionOpenGoodsJIngFenQueryResultResponse
- type UnionOpenGoodsPromotionGoodsInfoQueryQueryResult
- type UnionOpenGoodsPromotionGoodsInfoQueryResult
- type UnionOpenGoodsPromotionGoodsInfoQueryResultResponse
- type UnionOpenPromotionCommonGetGetResult
- type UnionOpenPromotionCommonGetResult
- type UnionOpenPromotionCommonGetResultResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { AppKey string // 应用Key SecretKey string // 密钥 ZapLog *zap.Logger // 日志服务 Db *gorm.DB // 关系数据库服务 RDb *redis.Client // 缓存数据库服务 MDb *mongo.Client // 非关系数据库服务 }
func (*App) CommissionIntegralToInt64 ¶
CommissionIntegralToInt64 佣金积分
func (*App) CouponAmountToInt64 ¶
CouponAmountToInt64 优惠券金额
func (*App) CouponProportionToInt64 ¶
CouponProportionToInt64 佣金比率
func (*App) GoodsOriginalPriceToInt64 ¶
GoodsOriginalPriceToInt64 商品原价
func (*App) GoodsPriceToInt64 ¶
GoodsPriceToInt64 商品券后价
func (*App) UnionOpenGoodsJIngFenQuery ¶
func (app *App) UnionOpenGoodsJIngFenQuery(notMustParams ...Params) *UnionOpenGoodsJIngFenQueryResult
UnionOpenGoodsJIngFenQuery 京东联盟精选优质商品,每日更新,可通过频道ID查询各个频道下的精选商品。用获取的优惠券链接调用转链接口时,需传入搜索接口link字段返回的原始优惠券链接,切勿对链接进行任何encode、decode操作,否则将导致转链二合一推广链接时校验失败 https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.goods.jingfen.query
func (*App) UnionOpenGoodsPromotionGoodsInfoQuery ¶
func (app *App) UnionOpenGoodsPromotionGoodsInfoQuery(notMustParams ...Params) *UnionOpenGoodsPromotionGoodsInfoQueryResult
UnionOpenGoodsPromotionGoodsInfoQuery 通过SKUID查询推广商品的名称、主图、类目、价格、物流、是否自营、30天引单数量等详细信息,支持批量获取。通常用于在媒体侧展示商品详情。 https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.goods.promotiongoodsinfo.query
func (*App) UnionOpenPromotionCommonGet ¶
func (app *App) UnionOpenPromotionCommonGet(notMustParams ...Params) *UnionOpenPromotionCommonGetResult
UnionOpenPromotionCommonGet 网站/APP来获取的推广链接,功能同宙斯接口的自定义链接转换、 APP领取代码接口通过商品链接、活动链接获取普通推广链接,支持传入subunionid参数,可用于区分媒体自身的用户ID,该参数可在订单查询接口返回,需向cps-qxsq@jd.com申请权限。 https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.promotion.common.get
type Params ¶
type Params map[string]interface{}
Params 请求参数
func NewParamsWithType ¶
func (Params) SetCustomParameters ¶
type UnionOpenGoodsJIngFenQueryQueryResult ¶
type UnionOpenGoodsJIngFenQueryQueryResult struct { Code int `json:"code"` Data []struct { BrandCode string `json:"brandCode"` BrandName string `json:"brandName"` CategoryInfo struct { Cid1 int64 `json:"cid1"` Cid1Name string `json:"cid1Name"` Cid2 int `json:"cid2"` Cid2Name string `json:"cid2Name"` Cid3 int `json:"cid3"` Cid3Name string `json:"cid3Name"` } `json:"categoryInfo"` Comments int `json:"comments"` CommissionInfo struct { Commission float64 `json:"commission"` CommissionShare float64 `json:"commissionShare"` CouponCommission float64 `json:"couponCommission"` EndTime int64 `json:"endTime"` IsLock int `json:"isLock"` PlusCommissionShare float64 `json:"plusCommissionShare"` StartTime int64 `json:"startTime"` } `json:"commissionInfo"` CouponInfo struct { CouponList []struct { BindType int `json:"bindType"` Discount float64 `json:"discount"` GetEndTime int64 `json:"getEndTime"` GetStartTime int64 `json:"getStartTime"` HotValue int `json:"hotValue,omitempty"` IsBest int `json:"isBest"` Link string `json:"link"` PlatformType int `json:"platformType"` Quota float64 `json:"quota"` UseEndTime int64 `json:"useEndTime"` UseStartTime int64 `json:"useStartTime"` } `json:"couponList"` } `json:"couponInfo"` DeliveryType int `json:"deliveryType"` ForbidTypes []int `json:"forbidTypes"` GoodCommentsShare float64 `json:"goodCommentsShare"` ImageInfo struct { ImageList []struct { Url string `json:"url"` } `json:"imageList"` WhiteImage string `json:"whiteImage,omitempty"` } `json:"imageInfo"` InOrderCount30Days int64 `json:"inOrderCount30Days"` InOrderCount30DaysSku int `json:"inOrderCount30DaysSku"` IsHot int `json:"isHot"` JxFlags []int `json:"jxFlags,omitempty"` MaterialUrl string `json:"materialUrl"` Owner string `json:"owner"` PinGouInfo struct { PingouEndTime int64 `json:"pingouEndTime,omitempty"` PingouPrice float64 `json:"pingouPrice,omitempty"` PingouStartTime int64 `json:"pingouStartTime,omitempty"` PingouTmCount int `json:"pingouTmCount,omitempty"` PingouUrl string `json:"pingouUrl,omitempty"` } `json:"pinGouInfo"` PriceInfo struct { HistoryPriceDay int `json:"historyPriceDay"` LowestCouponPrice float64 `json:"lowestCouponPrice"` LowestPrice float64 `json:"lowestPrice"` LowestPriceType int `json:"lowestPriceType"` Price float64 `json:"price"` } `json:"priceInfo"` ResourceInfo struct { EliteId int `json:"eliteId"` EliteName string `json:"eliteName"` } `json:"resourceInfo"` ShopInfo struct { ShopId int64 `json:"shopId"` ShopLabel string `json:"shopLabel"` ShopLevel float64 `json:"shopLevel"` ShopName string `json:"shopName"` AfsFactorScoreRankGrade string `json:"afsFactorScoreRankGrade,omitempty"` AfterServiceScore string `json:"afterServiceScore,omitempty"` CommentFactorScoreRankGrade string `json:"commentFactorScoreRankGrade,omitempty"` LogisticsFactorScoreRankGrade string `json:"logisticsFactorScoreRankGrade,omitempty"` LogisticsLvyueScore string `json:"logisticsLvyueScore,omitempty"` ScoreRankRate string `json:"scoreRankRate,omitempty"` UserEvaluateScore string `json:"userEvaluateScore,omitempty"` } `json:"shopInfo"` SkuId int64 `json:"skuId"` SkuLabelInfo struct { FxgServiceList []interface{} `json:"fxgServiceList"` Is7ToReturn int `json:"is7ToReturn"` } `json:"skuLabelInfo"` SkuName string `json:"skuName"` Spuid int64 `json:"spuid"` } `json:"data"` Message string `json:"message"` TotalCount int `json:"totalCount"` }
type UnionOpenGoodsJIngFenQueryResult ¶
type UnionOpenGoodsJIngFenQueryResult struct { Responce UnionOpenGoodsJIngFenQueryResultResponse // 结果 Result UnionOpenGoodsJIngFenQueryQueryResult // 结果 Body []byte // 内容 Err error // 错误 }
func NewUnionOpenGoodsJIngFenQueryResult ¶
func NewUnionOpenGoodsJIngFenQueryResult(responce UnionOpenGoodsJIngFenQueryResultResponse, result UnionOpenGoodsJIngFenQueryQueryResult, body []byte, err error) *UnionOpenGoodsJIngFenQueryResult
type UnionOpenGoodsPromotionGoodsInfoQueryQueryResult ¶
type UnionOpenGoodsPromotionGoodsInfoQueryQueryResult struct { Code int `json:"code"` Data []struct { UnitPrice float64 `json:"unitPrice"` MaterialUrl string `json:"materialUrl"` EndDate int64 `json:"endDate"` IsFreeFreightRisk int `json:"isFreeFreightRisk"` IsFreeShipping int `json:"isFreeShipping"` CommisionRatioWl float64 `json:"commisionRatioWl"` CommisionRatioPc float64 `json:"commisionRatioPc"` ImgUrl string `json:"imgUrl"` Vid int `json:"vid"` CidName string `json:"cidName"` WlUnitPrice float64 `json:"wlUnitPrice"` Cid2Name string `json:"cid2Name"` IsSeckill int `json:"isSeckill"` Cid2 int `json:"cid2"` Cid3Name string `json:"cid3Name"` Unt int `json:"unt"` Cid3 int `json:"cid3"` ShopId int `json:"shopId"` IsJdSale int `json:"isJdSale"` GoodsName string `json:"goodsName"` SkuId int64 `json:"skuId"` StartDate int64 `json:"startDate"` Cid int64 `json:"cid"` } `json:"data"` Message string `json:"message"` RequestId string `json:"requestId"` }
type UnionOpenGoodsPromotionGoodsInfoQueryResult ¶
type UnionOpenGoodsPromotionGoodsInfoQueryResult struct { Responce UnionOpenGoodsPromotionGoodsInfoQueryResultResponse // 结果 Result UnionOpenGoodsPromotionGoodsInfoQueryQueryResult // 结果 Body []byte // 内容 Err error // 错误 }
func NewUnionOpenGoodsPromotionGoodsInfoQueryResult ¶
func NewUnionOpenGoodsPromotionGoodsInfoQueryResult(responce UnionOpenGoodsPromotionGoodsInfoQueryResultResponse, result UnionOpenGoodsPromotionGoodsInfoQueryQueryResult, body []byte, err error) *UnionOpenGoodsPromotionGoodsInfoQueryResult
type UnionOpenPromotionCommonGetResult ¶
type UnionOpenPromotionCommonGetResult struct { Responce UnionOpenPromotionCommonGetResultResponse // 结果 Result UnionOpenPromotionCommonGetGetResult // 结果 Body []byte // 内容 Err error // 错误 }
func NewUnionOpenPromotionCommonGetResult ¶
func NewUnionOpenPromotionCommonGetResult(responce UnionOpenPromotionCommonGetResultResponse, result UnionOpenPromotionCommonGetGetResult, body []byte, err error) *UnionOpenPromotionCommonGetResult