meituan

package module
v0.0.0-...-05c9766 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Secret string        // 秘钥
	AppKey string        // 渠道标记
	ZapLog *zap.Logger   // 日志服务
	Db     *gorm.DB      // 关系数据库服务
	RDb    *redis.Client // 缓存数据库服务
	MDb    *mongo.Client // 非关系数据库服务
}

App 美团联盟

func (app *App) GenerateLink(actId int64, sid string, linkType, shortLink int) *GenerateLinkResult

GenerateLink 自助取链接口(新版) https://union.meituan.com/v2/apiDetail?id=25

func (*App) GetQuaLitYsCoreBySid

func (app *App) GetQuaLitYsCoreBySid(notMustParams ...Params) *GetQuaLitYsCoreBySidResult

GetQuaLitYsCoreBySid 优选sid质量分&复购率查询 https://union.meituan.com/v2/apiDetail?id=28

func (*App) MiniCode

func (app *App) MiniCode(actId int64, sid string) *MiniCodeResult

MiniCode 小程序生成二维码(新版) https://union.meituan.com/v2/apiDetail?id=26

func (*App) NewParamsWith

func (app *App) NewParamsWith(params ...Params) Params

func (*App) Order

func (app *App) Order(notMustParams ...Params) *OrderResult

Order 单订单查询接口(新版) https://union.meituan.com/v2/apiDetail?id=24

func (*App) OrderList

func (app *App) OrderList(notMustParams ...Params) *OrderListResult

OrderList 订单列表查询接口(新版) https://union.meituan.com/v2/apiDetail?id=23

func (*App) PoiDistrict

func (app *App) PoiDistrict(cityID int) *PoiDistrictResult

PoiDistrict 基础数据 - 城市的行政区接口 https://openapi.meituan.com/#api-0.%E5%9F%BA%E7%A1%80%E6%95%B0%E6%8D%AE-GetHttpsOpenapiMeituanComPoiDistrictCityid1

type GenerateLinkResponse

type GenerateLinkResponse struct {
	Status int    `json:"status"`         // 状态值,0为成功,非0为异常
	Des    string `json:"des,omitempty"`  // 异常描述信息
	Data   string `json:"data,omitempty"` // 最终的推广链接
}

type GenerateLinkResult

type GenerateLinkResult struct {
	Result GenerateLinkResponse // 结果
	Body   []byte               // 内容
	Err    error                // 错误
}

func NewGenerateLinkResult

func NewGenerateLinkResult(result GenerateLinkResponse, body []byte, err error) *GenerateLinkResult

type GetQuaLitYsCoreBySidResponse

type GetQuaLitYsCoreBySidResponse 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 GetQuaLitYsCoreBySidResult

type GetQuaLitYsCoreBySidResult struct {
	Result GetQuaLitYsCoreBySidResponse // 结果
	Body   []byte                       // 内容
	Err    error                        // 错误
}

func NewGetQuaLitYsCoreBySidResult

func NewGetQuaLitYsCoreBySidResult(result GetQuaLitYsCoreBySidResponse, body []byte, err error) *GetQuaLitYsCoreBySidResult

type MiniCodeResponse

type MiniCodeResponse struct {
	Status int    `json:"status"`         // 状态值,0为成功,非0为异常
	Des    string `json:"des,omitempty"`  // 异常描述信息
	Data   string `json:"data,omitempty"` // 小程序二维码图片地址
}

type MiniCodeResult

type MiniCodeResult struct {
	Result MiniCodeResponse // 结果
	Body   []byte           // 内容
	Err    error            // 错误
}

func NewMiniCodeResult

func NewMiniCodeResult(result MiniCodeResponse, body []byte, err error) *MiniCodeResult

type OrderListResponse

type OrderListResponse 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 OrderListResult

type OrderListResult struct {
	Result OrderListResponse // 结果
	Body   []byte            // 内容
	Err    error             // 错误
}

func NewOrderListResult

func NewOrderListResult(result OrderListResponse, body []byte, err error) *OrderListResult

type OrderResponse

type OrderResponse 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"`               // 商品数量
		OrderId          string      `json:"orderId"`                // 订单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 首购奖励
		RiskOrder        int         `json:"riskOrder"`              // 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 OrderResult

type OrderResult struct {
	Result OrderResponse // 结果
	Body   []byte        // 内容
	Err    error         // 错误
}

func NewOrderResult

func NewOrderResult(result OrderResponse, body []byte, err error) *OrderResult

type Params

type Params map[string]interface{}

Params 请求参数

func NewParams

func NewParams() Params

func (Params) Set

func (p Params) Set(key string, value interface{})

func (Params) SetParams

func (p Params) SetParams(params Params)

type PoiAreaResponse

type PoiAreaResponse struct {
	Code int `json:"code"`
	Data []struct {
		Area []struct {
			Name string `json:"name"` // 商圈名称
			ID   int    `json:"id"`   // 商圈id
		} `json:"area"`
		Name string `json:"name"` // 行政区名称
		ID   int    `json:"id"`   // 行政区id
	} `json:"data"`
}

type PoiAreaResult

type PoiAreaResult struct {
	Result PoiAreaResponse // 结果
	Body   []byte          // 内容
	Err    error           // 错误
}

func NewPoiAreaResult

func NewPoiAreaResult(result PoiAreaResponse, body []byte, err error) *PoiAreaResult

type PoiCategoryResponse

type PoiCategoryResponse struct {
	Code int `json:"code"`
	Data []struct {
		Name    string `json:"name"`
		Subcate []struct {
			Name string `json:"name"` // 品类名称
			ID   int    `json:"id"`   // 品类id
		} `json:"subcate"`
		ID int `json:"id"`
	} `json:"data"`
}

type PoiCategoryResult

type PoiCategoryResult struct {
	Result PoiCategoryResponse // 结果
	Body   []byte              // 内容
	Err    error               // 错误
}

func NewPoiCategoryResult

func NewPoiCategoryResult(result PoiCategoryResponse, body []byte, err error) *PoiCategoryResult

type PoiCityResponse

type PoiCityResponse struct {
	Code int `json:"code"` // 状态码 0表示请求正常
	Data []struct {
		Pinyin string `json:"pinyin"` // 城市拼音
		Name   string `json:"name"`   // 城市名称
		ID     int    `json:"id"`     // 城市id
	} `json:"data"` // 返回城市列表
}

type PoiCityResult

type PoiCityResult struct {
	Result PoiCityResponse // 结果
	Body   []byte          // 内容
	Err    error           // 错误
}

func NewPoiCityResult

func NewPoiCityResult(result PoiCityResponse, body []byte, err error) *PoiCityResult

type PoiDistrictResponse

type PoiDistrictResponse struct {
	Code int `json:"code"` // 状态码 0表示请求正常
	Data []struct {
		Name string `json:"name"` // 行政区名称
		ID   int    `json:"id"`   // 行政区id
	} `json:"data"` // 返回行政区列表
}

type PoiDistrictResult

type PoiDistrictResult struct {
	Result PoiDistrictResponse // 结果
	Body   []byte              // 内容
	Err    error               // 错误
}

func NewPoiDistrictResult

func NewPoiDistrictResult(result PoiDistrictResponse, body []byte, err error) *PoiDistrictResult

Jump to

Keyboard shortcuts

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