修改美团联盟取链 增加linkTypeList参数

This commit is contained in:
yanfan 2025-07-09 15:27:49 +08:00
parent ea00ab3a31
commit 4ae022fc5e
2 changed files with 13 additions and 11 deletions

View File

@ -22,7 +22,7 @@ func TestApiClient(t *testing.T) {
func (a *apiClientSuite) SetupSuite() { func (a *apiClientSuite) SetupSuite() {
log := logx.WithContext(context.Background()) log := logx.WithContext(context.Background())
apiClient := NewApiClient(log, AuthConfig{ apiClient := NewApiClient(log, AuthConfig{
AppKey: "", AppKey: "edf37a6019e045aeaec646220e4bd369",
AppSecret: "", AppSecret: "",
}) })
a.api = apiClient a.api = apiClient
@ -39,8 +39,9 @@ func (a *apiClientSuite) Test_Sign() {
func (a *apiClientSuite) Test_GenerateLink() { func (a *apiClientSuite) Test_GenerateLink() {
req := GenerateLinkRequest{ req := GenerateLinkRequest{
LinkType: 1, LinkType: 5,
ActId: "7", LinkTypeList: []int32{4, 5},
ActId: "529",
Sid: "f3a8c1", Sid: "f3a8c1",
} }
result, err := a.api.GenerateLink(context.Background(), req) result, err := a.api.GenerateLink(context.Background(), req)

View File

@ -3,6 +3,7 @@ package meituan_media
// GenerateLinkRequest 生成推广链接请求 // GenerateLinkRequest 生成推广链接请求
type GenerateLinkRequest struct { type GenerateLinkRequest struct {
LinkType int32 `json:"linkType"` // 必填 链接类型枚举值1 H5长链接2 H5短链接3 deeplink(唤起)链接4 微信小程序唤起路径 LinkType int32 `json:"linkType"` // 必填 链接类型枚举值1 H5长链接2 H5短链接3 deeplink(唤起)链接4 微信小程序唤起路径
LinkTypeList []int32 `json:"linkTypeList"` // 必填 链接类型枚举值1 H5长链接2 H5短链接3 deeplink(唤起)链接4 微信小程序唤起路径
Platform int32 `json:"platform,omitempty"` // 非必填 商品所属业务一级分类类型请求的商品推广链接所属的业务类型信息即只有输入skuViewId时才需要传本字段1 到家及其他业务类型2 到店业务类型不填则默认1 Platform int32 `json:"platform,omitempty"` // 非必填 商品所属业务一级分类类型请求的商品推广链接所属的业务类型信息即只有输入skuViewId时才需要传本字段1 到家及其他业务类型2 到店业务类型不填则默认1
BizLine int32 `json:"bizLine,omitempty"` // 非必填 商品所属业务二级分类类型请求的商品推广链接所属的业务类型信息即只有输入skuViewId时才需要传本字段当字段platform为1选择到家及其他业务类型时5 医药不填则默认null表示外卖商品券当字段platform为2选择到店业务类型时1 到餐2 到综 3酒店 4门票 不填则默认1 BizLine int32 `json:"bizLine,omitempty"` // 非必填 商品所属业务二级分类类型请求的商品推广链接所属的业务类型信息即只有输入skuViewId时才需要传本字段当字段platform为1选择到家及其他业务类型时5 医药不填则默认null表示外卖商品券当字段platform为2选择到店业务类型时1 到餐2 到综 3酒店 4门票 不填则默认1
ActId string `json:"actId,omitempty"` // 非必填 活动物料ID我要推广-活动推广中第一列的id信息和商品id、活动链接三选一填写不能全填 ActId string `json:"actId,omitempty"` // 非必填 活动物料ID我要推广-活动推广中第一列的id信息和商品id、活动链接三选一填写不能全填