Documentation ¶
Index ¶
- Constants
- type ApiGenerateLinkResponse
- type ApiGenerateLinkResult
- type ApiGetQuaLitYsCoreBySidResponse
- type ApiGetQuaLitYsCoreBySidResult
- type ApiMiniCodeResponse
- type ApiMiniCodeResult
- type ApiMtUnionCategoryResponse
- type ApiMtUnionCategoryResult
- type ApiMtUnionCityResponse
- type ApiMtUnionCityResult
- type ApiMtUnionPoiResponse
- type ApiMtUnionPoiResult
- type ApiMtUnionSkuResponse
- type ApiMtUnionSkuResult
- type ApiOrderListResponse
- type ApiOrderListResult
- type ApiOrderResponse
- type ApiOrderResult
- type Client
- func (c *Client) ApiGenerateLink(ctx context.Context, notMustParams ...gorequest.Params) *ApiGenerateLinkResult
- func (c *Client) ApiGetQuaLitYsCoreBySid(ctx context.Context, notMustParams ...gorequest.Params) *ApiGetQuaLitYsCoreBySidResult
- func (c *Client) ApiMiniCode(ctx context.Context, notMustParams ...gorequest.Params) *ApiMiniCodeResult
- func (c *Client) ApiMtUnionCategory(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionCategoryResult
- func (c *Client) ApiMtUnionCity(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionCityResult
- func (c *Client) ApiMtUnionPoi(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionPoiResult
- func (c *Client) ApiMtUnionSku(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionSkuResult
- 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) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)
- func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)
- 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) Post(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)
- 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 ApiMtUnionCategoryResponse ¶ added in v1.0.59
type ApiMtUnionCategoryResult ¶ added in v1.0.59
type ApiMtUnionCategoryResult struct { Result ApiMtUnionCategoryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiMtUnionCityResponse ¶ added in v1.0.59
type ApiMtUnionCityResult ¶ added in v1.0.59
type ApiMtUnionCityResult struct { Result ApiMtUnionCityResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiMtUnionPoiResponse ¶ added in v1.0.59
type ApiMtUnionPoiResponse struct { Code int `json:"code"` Msg string `json:"msg"` Data struct { DataList []struct { PoiViewId string `json:"poiViewId"` // POI门店ID PoiName string `json:"poiName"` // POI名称 PoiPicUrl string `json:"poiPicUrl"` // 店铺图URL PoiScore string `json:"poiScore"` // 店铺评分,满分5分 MonthSale string `json:"monthSale"` // 月售量 ShippingFee string `json:"shippingFee"` // 配送费金额,单位元 MinPrice string `json:"minPrice"` // 起送金额,单位元 Distance string `json:"distance"` // 门店距离,单位米 AvgDeliveryTime string `json:"avgDeliveryTime"` // 配送时长,单位分钟 ReduceShippingFee float64 `json:"reduceShippingFee"` // 满减配送费 PoiMarkTagUrl string `json:"poiMarkTagUrl"` // 角标信息 MerchantFullSale string `json:"merchantFullSale"` // 店铺满减,举例:38减25 MerchantDiscount string `json:"merchantDiscount"` // 店铺折扣,举例:3.4折起 NewCustomerDiscount string `json:"newCustomerDiscount"` // 新客立减,举例:新客减1 RebateCoupon string `json:"rebateCoupon"` // 返券,举例:返3元券 MerchantCoupon string `json:"merchantCoupon"` // 商家券,举例:领3元券 FullComplimentary string `json:"fullComplimentary"` // 满赠,举例:满68元得赠品 } `json:"dataList"` PageTraceId string `json:"pageTraceId"` // 分页查询参数,第二次查询传回 } `json:"data"` }
type ApiMtUnionPoiResult ¶ added in v1.0.59
type ApiMtUnionPoiResult struct { Result ApiMtUnionPoiResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiMtUnionSkuResponse ¶ added in v1.0.59
type ApiMtUnionSkuResponse struct { Code int `json:"code"` Msg string `json:"msg"` Data struct { DataList []struct { SkuId string `json:"skuId"` // sku编号 SkuName string `json:"skuName"` // sku名称 Price string `json:"price"` // 展示价格,单位分 Pic float64 `json:"pic"` // 商品主图 CategoryId float64 `json:"categoryId"` // 商品类目ID CategoryName string `json:"categoryName"` // 商品类目名称 SalesVolume float64 `json:"salesVolume"` // 当前sku销量 } `json:"dataList"` Total int64 `json:"total"` // 商品总数 } `json:"data"` }
type ApiMtUnionSkuResult ¶ added in v1.0.59
type ApiMtUnionSkuResult struct { Result ApiMtUnionSkuResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type ApiOrderListResponse ¶ added in v1.0.44
type ApiOrderListResponse struct { DataList []struct { ActId int `json:"actId,omitempty"` // 活动id,可以在联盟活动列表中查看获取 BusinessLine int `json:"businessLine,omitempty"` // 业务线 SubBusinessLine int `json:"subBusinessLine,omitempty"` // 子业务线 Orderid string `json:"orderid,omitempty"` // 订单id Paytime string `json:"paytime,omitempty"` // 订单支付时间,10位时间戳 Payprice string `json:"payprice,omitempty"` // 订单用户实际支付金额 Profit string `json:"profit,omitempty"` // 订单预估返佣金额 CpaProfit string `json:"cpaProfit,omitempty"` // 订单预估cpa总收益(优选、话费券) Sid string `json:"sid,omitempty"` // 订单对应的推广位sid Appkey string `json:"appkey,omitempty"` // 订单对应的appkey,外卖、话费、闪购、优选订单会返回该字段 Smstitle string `json:"smstitle,omitempty"` // 订单标题 ProductId string `json:"productId,omitempty"` // 商品ID ProductName string `json:"productName,omitempty"` // 商品名称 Refundprice string `json:"refundprice,omitempty"` // 订单实际退款金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段 Refundtime string `json:"refundtime,omitempty"` // 订单退款时间,10位时间戳,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段(退款时间为最近的一次退款) Refundprofit string `json:"refundprofit,omitempty"` // 订单需要扣除的返佣金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段 CpaRefundProfit string `json:"cpaRefundProfit,omitempty"` // 订单需要扣除的cpa返佣金额(优选、话费券) Status int `json:"status,omitempty"` // 订单状态,外卖、话费、闪购、优选、酒店订单会返回该字段 1 已付款 8 已完成 9 已退款或风控 TradeTypeList []int `json:"tradeTypeList,omitempty"` // 订单的奖励类型 3 首购奖励 5 留存奖励 2 cps 3 首购奖励 RiskOrder int `json:"riskOrder,omitempty"` // 0表示非风控订单,1表示风控订单 Extra string `json:"extra,omitempty"` TradeTypeBusinessTypeMapStr string `json:"tradeTypeBusinessTypeMapStr,omitempty"` } `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 { ActId int `json:"actId,omitempty"` // 活动id,可以在联盟活动列表中查看获取 BusinessLine int `json:"businessLine,omitempty"` // 业务线 SubBusinessLine int `json:"subBusinessLine,omitempty"` // 子业务线 Quantity int `json:"quantity,omitempty"` // 商品数量 OrderId string `json:"orderId,omitempty"` // 订单id Paytime string `json:"paytime,omitempty"` // 订单支付时间,10位时间戳 ModTime string `json:"modTime,omitempty"` // 订单信息修改时间,10位时间戳 Payprice string `json:"payprice,omitempty"` // 订单用户实际支付金额 Profit string `json:"profit,omitempty"` // 订单预估返佣金额 CpaProfit string `json:"cpaProfit,omitempty"` // 订单预估cpa总收益(优选、话费券) Sid string `json:"sid,omitempty"` // 订单对应的推广位sid Appkey string `json:"appkey,omitempty"` // 订单对应的appkey,外卖、话费、闪购、优选、酒店订单会返回该字段 Smstitle string `json:"smstitle,omitempty"` // 订单标题 Status int `json:"status,omitempty"` // 订单状态,外卖、话费、闪购、优选、酒店订单会返回该字段 1 已付款 8 已完成 9 已退款或风控 TradeTypeList []int `json:"tradeTypeList,omitempty"` // 订单的奖励类型 3 首购奖励 5 留存奖励 2 cps 3 首购奖励 RiskApiOrder int `json:"riskApiOrder,omitempty"` // 0表示非风控订单,1表示风控订单 Refundprofit string `json:"refundprofit,omitempty"` // 订单需要扣除的返佣金额,外卖、话费、闪购、优选、酒店订单若发生退款会返回该字段 CpaRefundProfit string `json:"cpaRefundProfit,omitempty"` // 订单需要扣除的cpa返佣金额(优选、话费券) RefundInfoList struct { Id string `json:"id,omitempty"` RefundPrice string `json:"refundPrice,omitempty"` RefundTime string `json:"refundTime,omitempty"` RefundType int `json:"refundType,omitempty"` } `json:"refundInfoList,omitempty"` // 退款列表 RefundProfitList struct { Id string `json:"id,omitempty"` RefundProfit string `json:"refundProfit,omitempty"` RefundFinishTime string `json:"refundFinishTime,omitempty"` Type int `json:"type,omitempty"` } `json:"refundProfitList,omitempty"` ConsumeProfitList struct { Id string `json:"id,omitempty"` ConsumeProfit string `json:"consumeProfit,omitempty"` ConsumeFinishTime string `json:"consumeFinishTime,omitempty"` Type string `json:"type,omitempty"` } `json:"consumeProfitList,omitempty"` CouponCode string `json:"coupon_code,omitempty"` // 券码 ProductId string `json:"productId,omitempty"` // 商品ID ProductName string `json:"productName,omitempty"` // 商品名称 } `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, notMustParams ...gorequest.Params) *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
func (c *Client) ApiMiniCode(ctx context.Context, notMustParams ...gorequest.Params) *ApiMiniCodeResult
ApiMiniCode 小程序生成二维码(新版) https://union.meituan.com/v2/apiDetail?id=26
func (*Client) ApiMtUnionCategory ¶ added in v1.0.59
func (c *Client) ApiMtUnionCategory(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionCategoryResult
ApiMtUnionCategory 商品类目查询(新版) https://union.meituan.com/v2/apiDetail?id=30
func (*Client) ApiMtUnionCity ¶ added in v1.0.59
func (c *Client) ApiMtUnionCity(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionCityResult
ApiMtUnionCity 城市信息查询(新版) https://union.meituan.com/v2/apiDetail?id=29
func (*Client) ApiMtUnionPoi ¶ added in v1.0.59
func (c *Client) ApiMtUnionPoi(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionPoiResult
ApiMtUnionPoi 门店POI查询(新版) https://union.meituan.com/v2/apiDetail?id=32
func (*Client) ApiMtUnionSku ¶ added in v1.0.59
func (c *Client) ApiMtUnionSku(ctx context.Context, notMustParams ...gorequest.Params) *ApiMtUnionSkuResult
ApiMtUnionSku 商品列表查询(新版) https://union.meituan.com/v2/apiDetail?id=31
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) ConfigZapClientFun ¶ added in v1.0.141
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)
ConfigZapClientFun 日志配置
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:"smstitle,omitempty"` // 订单标题 Quantity string `json:"quantity,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 数据正常
Source Files ¶
- api.generate_link.go
- api.getqualityscorebysid.go
- api.go
- api.mini_code.go
- api.mtunion.category.go
- api.mtunion.city.go
- api.mtunion.poi.go
- api.mtunion.sku.go
- api.order.go
- api.orderList.go
- client.go
- config.go
- const.go
- get.go
- poi.area.go
- poi.category.go
- poi.city.go
- poi.district.go
- request.go
- service_http.order.go
- sign.go