Documentation ¶
Index ¶
- Constants
- type ApiGenerateLinkResponse
- type ApiGenerateLinkResult
- type ApiGetQuaLitYsCoreBySidResponse
- type ApiGetQuaLitYsCoreBySidResult
- type ApiMiniCodeResponse
- type ApiMiniCodeResult
- type ApiOrderListResponse
- type ApiOrderListResult
- type ApiOrderResponse
- type ApiOrderResult
- type Client
- func (c *Client) ApiGenerateLink(ctx context.Context, actId int64, sid string, linkType, shortLink int) *ApiGenerateLinkResult
- func (c *Client) ApiGetQuaLitYsCoreBySid(ctx context.Context, notMustParams ...gorequest.Params) *ApiGetQuaLitYsCoreBySidResult
- func (c *Client) ApiMiniCode(ctx context.Context, actId int64, sid string) *ApiMiniCodeResult
- func (c *Client) ApiOrder(ctx context.Context, notMustParams ...gorequest.Params) *ApiOrderResult
- func (c *Client) ApiOrderList(ctx context.Context, notMustParams ...gorequest.Params) *ApiOrderListResult
- func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
- func (c *Client) GetAppKey() string
- func (c *Client) GetLog() *golog.ApiClient
- func (c *Client) GetSecret() string
- func (c *Client) PoiArea(ctx context.Context, cityID int) *PoiAreaResult
- func (c *Client) PoiCategory(ctx context.Context, cityID int) *PoiCategoryResult
- func (c *Client) PoiCity(ctx context.Context) *PoiCityResult
- func (c *Client) PoiDistrict(ctx context.Context, cityID int) *PoiDistrictResult
- func (c *Client) ServeHttpOrder(ctx context.Context, gCtx *gin.Context) (validateJson ResponseServeHttpOrder, err error)
- type ClientConfig
- type PoiAreaResponse
- type PoiAreaResult
- type PoiCategoryResponse
- type PoiCategoryResult
- type PoiCityResponse
- type PoiCityResult
- type PoiDistrictResponse
- type PoiDistrictResult
- type ResponseServeHttpOrder
Constants ¶
const (
LogTable = "meituan"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiGenerateLinkResponse ¶ added in v1.0.44
type ApiGenerateLinkResult ¶ added in v1.0.44
type ApiGenerateLinkResult struct { Result ApiGenerateLinkResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiGetQuaLitYsCoreBySidResponse ¶ added in v1.0.44
type ApiGetQuaLitYsCoreBySidResponse struct { Status int `json:"status"` Des string `json:"des"` Data struct { DataList []struct { Appkey string `json:"appkey"` // appkey Sid string `json:"sid"` // 推广位sid Date string `json:"date"` // 质量分归属日期 QualityGrade string `json:"qualityGrade"` // 质量分 RepurchaseRate string `json:"repurchaseRate"` // sid维度的七日复购率 } `json:"dataList"` Total int `json:"total"` } `json:"data"` }
type ApiGetQuaLitYsCoreBySidResult ¶ added in v1.0.44
type ApiGetQuaLitYsCoreBySidResult struct { Result ApiGetQuaLitYsCoreBySidResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiMiniCodeResponse ¶ added in v1.0.44
type ApiMiniCodeResult ¶ added in v1.0.44
type ApiMiniCodeResult struct { Result ApiMiniCodeResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiOrderListResponse ¶ added in v1.0.44
type ApiOrderListResponse struct { DataList []struct { Orderid string `json:"orderid"` // 订单id Paytime string `json:"paytime"` // 订单支付时间,10位时间戳 Payprice string `json:"payprice"` // 订单用户实际支付金额 Sid string `json:"sid"` // 订单对应的推广位sid Smstitle string `json:"smstitle"` // 订单标题 Appkey string `json:"appkey"` // 订单对应的appkey,外卖、话费、闪购、优选订单会返回该字段 Status int `json:"status"` // 订单状态,外卖、话费、闪购、优选、酒店订单会返回该字段 1 已付款 8 已完成 9 已退款或风控 Profit string `json:"profit"` // 订单预估返佣金额 CpaProfit string `json:"cpaProfit"` // 订单预估cpa总收益(优选、话费券) Refundtime string `json:"refundtime"` // 订单退款时间,10位时间戳,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段(退款时间为最近的一次退款) Refundprice string `json:"refundprice"` // 订单实际退款金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段 Refundprofit string `json:"refundprofit"` // 订单需要扣除的返佣金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段 CpaRefundProfit string `json:"cpaRefundProfit"` // 订单需要扣除的cpa返佣金额(优选、话费券) Extra string `json:"extra"` TradeTypeList []int `json:"tradeTypeList"` // 订单的奖励类型 3 首购奖励 5 留存奖励 2 cps 3 首购奖励 TradeTypeBusinessTypeMapStr string `json:"tradeTypeBusinessTypeMapStr"` RiskOrder int `json:"riskOrder"` // 0表示非风控订单,1表示风控订单 BusinessLine int `json:"businessLine"` // 业务线 SubBusinessLine int `json:"subBusinessLine"` // 子业务线 ActId int `json:"actId"` // 活动id,可以在联盟活动列表中查看获取 } `json:"dataList"` Total int `json:"total"` // 查询条件命中的总数据条数,用于计算分页参数 }
type ApiOrderListResult ¶ added in v1.0.44
type ApiOrderListResult struct { Result ApiOrderListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiOrderResponse ¶ added in v1.0.44
type ApiOrderResponse struct { Status int `json:"status"` Des string `json:"des"` Data struct { BusinessLine int `json:"businessLine"` // 业务线 SubBusinessLine int `json:"subBusinessLine"` // 子业务线 ActId int `json:"actId"` // 活动id,可以在联盟活动列表中查看获取 Quantity int `json:"quantity"` // 商品数量 ApiOrderId string `json:"ApiOrderId"` // 订单id Paytime string `json:"paytime"` // 订单支付时间,10位时间戳 ModTime string `json:"modTime"` // 订单信息修改时间,10位时间戳 Payprice string `json:"payprice"` // 订单用户实际支付金额 Profit string `json:"profit,omitempty"` // 订单预估返佣金额 CpaProfit string `json:"cpaProfit,omitempty"` // 订单预估cpa总收益(优选、话费券) Sid string `json:"sid"` // 订单对应的推广位sid Appkey string `json:"appkey"` // 订单对应的appkey,外卖、话费、闪购、优选、酒店订单会返回该字段 Smstitle string `json:"smstitle"` // 订单标题 Status int `json:"status"` // 订单状态,外卖、话费、闪购、优选、酒店订单会返回该字段 1 已付款 8 已完成 9 已退款或风控 TradeTypeList []int `json:"tradeTypeList"` // 订单的奖励类型 3 首购奖励 5 留存奖励 2 cps 3 首购奖励 RiskApiOrder int `json:"riskApiOrder"` // 0表示非风控订单,1表示风控订单 Refundprofit string `json:"refundprofit,omitempty"` // 订单需要扣除的返佣金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段 CpaRefundProfit interface{} `json:"cpaRefundProfit"` // 订单需要扣除的cpa返佣金额(优选、话费券) RefundInfoList interface{} `json:"refundInfoList"` // 退款列表 RefundProfitList interface{} `json:"refundProfitList"` Extra interface{} `json:"extra"` } `json:"data"` }
type ApiOrderResult ¶ added in v1.0.44
type ApiOrderResult struct { Result ApiOrderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type Client ¶ added in v1.0.47
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func NewClient ¶ added in v1.0.47
func NewClient(config *ClientConfig) (*Client, error)
NewClient 创建实例化
func (*Client) ApiGenerateLink ¶ added in v1.0.47
func (c *Client) ApiGenerateLink(ctx context.Context, actId int64, sid string, linkType, shortLink int) *ApiGenerateLinkResult
ApiGenerateLink 自助取链接口(新版) https://union.meituan.com/v2/apiDetail?id=25
func (*Client) ApiGetQuaLitYsCoreBySid ¶ added in v1.0.47
func (c *Client) ApiGetQuaLitYsCoreBySid(ctx context.Context, notMustParams ...gorequest.Params) *ApiGetQuaLitYsCoreBySidResult
ApiGetQuaLitYsCoreBySid 优选sid质量分&复购率查询 https://union.meituan.com/v2/apiDetail?id=28
func (*Client) ApiMiniCode ¶ added in v1.0.47
ApiMiniCode 小程序生成二维码(新版) https://union.meituan.com/v2/apiDetail?id=26
func (*Client) ApiOrder ¶ added in v1.0.47
ApiOrder 单订单查询接口(新版) https://union.meituan.com/v2/apiDetail?id=24
func (*Client) ApiOrderList ¶ added in v1.0.47
func (c *Client) ApiOrderList(ctx context.Context, notMustParams ...gorequest.Params) *ApiOrderListResult
ApiOrderList 订单列表查询接口(新版) https://union.meituan.com/v2/apiDetail?id=23
func (*Client) ConfigApiClientFun ¶ added in v1.0.52
func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
ConfigApiClientFun 日志配置
func (*Client) PoiArea ¶ added in v1.0.47
func (c *Client) PoiArea(ctx context.Context, cityID int) *PoiAreaResult
PoiArea 基础数据 - 商圈接口 https://openapi.meituan.com/#api-0.%E5%9F%BA%E7%A1%80%E6%95%B0%E6%8D%AE-GetHttpsOpenapiMeituanComPoiAreaCityid1
func (*Client) PoiCategory ¶ added in v1.0.47
func (c *Client) PoiCategory(ctx context.Context, cityID int) *PoiCategoryResult
PoiCategory 基础数据 - 品类接口 https://openapi.meituan.com/#api-0.%E5%9F%BA%E7%A1%80%E6%95%B0%E6%8D%AE-GetHttpsOpenapiMeituanComPoiDistrictCityid1
func (*Client) PoiCity ¶ added in v1.0.47
func (c *Client) PoiCity(ctx context.Context) *PoiCityResult
PoiCity 基础数据 - 开放城市接口 https://openapi.meituan.com/#api-0.%E5%9F%BA%E7%A1%80%E6%95%B0%E6%8D%AE-GetHttpsOpenapiMeituanComPoiCity
func (*Client) PoiDistrict ¶ added in v1.0.47
func (c *Client) PoiDistrict(ctx context.Context, cityID int) *PoiDistrictResult
PoiDistrict 基础数据 - 城市的行政区接口 https://openapi.meituan.com/#api-0.%E5%9F%BA%E7%A1%80%E6%95%B0%E6%8D%AE-GetHttpsOpenapiMeituanComPoiDistrictCityid1
func (*Client) ServeHttpOrder ¶ added in v1.0.47
func (c *Client) ServeHttpOrder(ctx context.Context, gCtx *gin.Context) (validateJson ResponseServeHttpOrder, err error)
ServeHttpOrder 订单回推接口(新版) https://union.meituan.com/v2/apiDetail?id=22
type ClientConfig ¶ added in v1.0.52
ClientConfig 实例配置
type PoiAreaResponse ¶ added in v1.0.44
type PoiAreaResult ¶ added in v1.0.44
type PoiAreaResult struct { Result PoiAreaResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type PoiCategoryResponse ¶ added in v1.0.44
type PoiCategoryResult ¶ added in v1.0.44
type PoiCategoryResult struct { Result PoiCategoryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type PoiCityResponse ¶ added in v1.0.44
type PoiCityResult ¶ added in v1.0.44
type PoiCityResult struct { Result PoiCityResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type PoiDistrictResponse ¶ added in v1.0.44
type PoiDistrictResult ¶ added in v1.0.44
type PoiDistrictResult struct { Result PoiDistrictResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ResponseServeHttpOrder ¶ added in v1.0.47
type ResponseServeHttpOrder struct { Smstitle string `json:"appId,omitempty"` // 订单标题 Quantity string `json:"CreateTime,omitempty"` // 订单数量 Orderid string `json:"orderid,omitempty"` // 订单id Dealid string `json:"dealid,omitempty"` // 店铺id(部分存在) Paytime string `json:"paytime,omitempty"` // 订单支付时间,10位时间戳 ActId string `json:"actId,omitempty"` // 活动id,可以在联盟活动列表中查看获取 BusinessLine string `json:"businessLine,omitempty"` // 详见业务线类型 SubBusinessLine string `json:"subBusinessLine,omitempty"` // 子业务线 Type string `json:"type,omitempty"` // 订单类型,枚举值同订单查询接口定义 Ordertime string `json:"ordertime,omitempty"` // 下单时间,10位时间戳 Sid string `json:"sid,omitempty"` // 媒体推广位sid Appkey string `json:"appkey,omitempty"` // 媒体名称,可在推广者备案-媒体管理中查询 Uid string `json:"uid,omitempty"` // 渠道id Status string `json:"status,omitempty"` // 订单状态,枚举值同订单查询接口返回定义 Total string `json:"total,omitempty"` // 订单总金额 PayPrice string `json:"payPrice,omitempty"` // 订单实际支付金额 ModTime string `json:"modTime,omitempty"` // 订单修改时间 ProductId string `json:"productId,omitempty"` // 商品ID ProductName string `json:"productName,omitempty"` // 商品名称 Direct string `json:"direct,omitempty"` // 订单实际支付金额 Ratio string `json:"ratio,omitempty"` // 订单返佣比例,cps活动的订单会返回该字段 Sign string `json:"sign,omitempty"` // 订单签名字段,计算方法参见文档中签名(sign)生成逻辑 TradeTypeList string `json:"tradeTypeList,omitempty"` // 优选订单类型返回该字段 ConsumeType string `json:"consumeType,omitempty"` // 核销类型 RefundType string `json:"refundType,omitempty"` // 退款类型 EncryptionVoucherId string `json:"encryptionVoucherId,omitempty"` // 消费券加密券ID }
ResponseServeHttpOrder 返回参数
func (*ResponseServeHttpOrder) Error ¶ added in v1.0.47
func (r *ResponseServeHttpOrder) Error(c *gin.Context)
Error 数据错误
func (*ResponseServeHttpOrder) Success ¶ added in v1.0.47
func (r *ResponseServeHttpOrder) Success(c *gin.Context)
Success 数据正常