Compare commits
16 Commits
a8de0270af
...
8f03a210f5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f03a210f5 | ||
|
|
1156ddac7c | ||
|
|
ee095543e0 | ||
|
|
4491ffc8c2 | ||
|
|
6bb4957ffe | ||
|
|
b3b0b5a629 | ||
|
|
08359eefcc | ||
|
|
cdb09a992f | ||
|
|
84fadc17b0 | ||
|
|
a88648153f | ||
|
|
8ed264d90f | ||
|
|
fb029ec4de | ||
|
|
6e990b37dc | ||
|
|
a470a5ebb8 | ||
|
|
52694b22e5 | ||
|
|
6b64032a07 |
@ -36,8 +36,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
sdk "gitee.com/chengdu-lenntc/third-platform-sdk"
|
sdk "repository.lenntc.com/lenntc/third-platform-sdk"
|
||||||
meituanapi "gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan-union"
|
meituanapi "repository.lenntc.com/lenntc/third-platform-sdk/platform/meituan-union"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PromotionConf struct {
|
type PromotionConf struct {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HttpRequest http请求参数
|
// HttpRequest http请求参数
|
||||||
|
|||||||
5
go.mod
5
go.mod
@ -1,4 +1,4 @@
|
|||||||
module gitee.com/chengdu-lenntc/third-platform-sdk
|
module repository.lenntc.com/lenntc/third-platform-sdk
|
||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
@ -12,6 +12,8 @@ require (
|
|||||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/fatih/color v1.15.0 // indirect
|
github.com/fatih/color v1.15.0 // indirect
|
||||||
@ -26,5 +28,6 @@ require (
|
|||||||
go.uber.org/automaxprocs v1.5.3 // indirect
|
go.uber.org/automaxprocs v1.5.3 // indirect
|
||||||
go.uber.org/multierr v1.9.0 // indirect
|
go.uber.org/multierr v1.9.0 // indirect
|
||||||
golang.org/x/sys v0.11.0 // indirect
|
golang.org/x/sys v0.11.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.31.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
32
index.go
32
index.go
@ -3,12 +3,14 @@ package third_platform_sdk
|
|||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
didiunion "gitee.com/chengdu-lenntc/third-platform-sdk/platform/didi-union"
|
didiunion "repository.lenntc.com/lenntc/third-platform-sdk/platform/didi-union"
|
||||||
elemeunion "gitee.com/chengdu-lenntc/third-platform-sdk/platform/eleme-union"
|
elemeunion "repository.lenntc.com/lenntc/third-platform-sdk/platform/eleme-union"
|
||||||
meituancsr "gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan-csr"
|
elonghotel "repository.lenntc.com/lenntc/third-platform-sdk/platform/elong-hotel"
|
||||||
meituanunion "gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan-union"
|
"repository.lenntc.com/lenntc/third-platform-sdk/platform/jutuike"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan_media"
|
meituancsr "repository.lenntc.com/lenntc/third-platform-sdk/platform/meituan-csr"
|
||||||
t3_union "gitee.com/chengdu-lenntc/third-platform-sdk/platform/t3-union"
|
"repository.lenntc.com/lenntc/third-platform-sdk/platform/meituan-media"
|
||||||
|
meituanunion "repository.lenntc.com/lenntc/third-platform-sdk/platform/meituan-union"
|
||||||
|
t3_union "repository.lenntc.com/lenntc/third-platform-sdk/platform/t3-union"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Platform 第三方平台
|
// Platform 第三方平台
|
||||||
@ -25,6 +27,10 @@ const (
|
|||||||
PlatformT3Union = "t3_union"
|
PlatformT3Union = "t3_union"
|
||||||
// PlatformMeituanMedia 美团-美天赚
|
// PlatformMeituanMedia 美团-美天赚
|
||||||
PlatformMeituanMedia = "meituan_media"
|
PlatformMeituanMedia = "meituan_media"
|
||||||
|
// PlatformJutuike 聚推客
|
||||||
|
PlatformJutuike = "jutuike"
|
||||||
|
// PlatformElongHotel 同程酒店
|
||||||
|
PlatformElongHotel = "elong_hotel"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PlatformNameMap 平台名称
|
// PlatformNameMap 平台名称
|
||||||
@ -35,6 +41,8 @@ var PlatformNameMap = map[string]string{
|
|||||||
PlatformDidiUnion: "滴滴联盟",
|
PlatformDidiUnion: "滴滴联盟",
|
||||||
PlatformT3Union: "t3联盟",
|
PlatformT3Union: "t3联盟",
|
||||||
PlatformMeituanMedia: "美团-美天赚",
|
PlatformMeituanMedia: "美团-美天赚",
|
||||||
|
PlatformJutuike: "聚推客",
|
||||||
|
PlatformElongHotel: "同程酒店",
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPlatformName 获取平台名称
|
// GetPlatformName 获取平台名称
|
||||||
@ -62,10 +70,22 @@ func NewDidiUnionApi(log logx.Logger, conf didiunion.AuthConfig) didiunion.DidiU
|
|||||||
return didiunion.NewApiClient(log, conf)
|
return didiunion.NewApiClient(log, conf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewT3UnionApi t3联盟
|
||||||
func NewT3UnionApi(log logx.Logger, conf t3_union.AuthConfig) t3_union.T3UnionApi {
|
func NewT3UnionApi(log logx.Logger, conf t3_union.AuthConfig) t3_union.T3UnionApi {
|
||||||
return t3_union.NewApiClient(log, conf)
|
return t3_union.NewApiClient(log, conf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewMeituanMediaApi 美团-美天赚
|
||||||
func NewMeituanMediaApi(log logx.Logger, conf meituan_media.AuthConfig) meituan_media.MeituanMediaApi {
|
func NewMeituanMediaApi(log logx.Logger, conf meituan_media.AuthConfig) meituan_media.MeituanMediaApi {
|
||||||
return meituan_media.NewApiClient(log, conf)
|
return meituan_media.NewApiClient(log, conf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewJutuikeApi 聚推客
|
||||||
|
func NewJutuikeApi(log logx.Logger, conf jutuike.AuthConfig) jutuike.JutuikeApi {
|
||||||
|
return jutuike.NewApiClient(log, conf)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewElongHotelApi 同程酒店
|
||||||
|
func NewElongHotelApi(log logx.Logger, conf elonghotel.AuthConfig) elonghotel.ElongHotelApi {
|
||||||
|
return elonghotel.NewApiClient(log, conf)
|
||||||
|
}
|
||||||
|
|||||||
@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"github.com/zywaited/xcopy"
|
"github.com/zywaited/xcopy"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
||||||
sdkutil "gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/util"
|
sdkutil "repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// todo:: 定义统一的返回错误结构
|
// todo:: 定义统一的返回错误结构
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// api-单元测试
|
// api-单元测试
|
||||||
@ -55,3 +55,21 @@ func (a *apiClientSuite) Test_GenerateH5Link() {
|
|||||||
}
|
}
|
||||||
a.T().Logf("=====[TestGenerateH5Link] resp: %+v, err: %v", resp, err)
|
a.T().Logf("=====[TestGenerateH5Link] resp: %+v, err: %v", resp, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||||
|
ctx := context.Background()
|
||||||
|
req := QueryOrderListRequest{
|
||||||
|
Page: 1,
|
||||||
|
Size: 100,
|
||||||
|
StartTime: time.Unix(1714492800, 0),
|
||||||
|
EndTime: time.Unix(1717171199, 0),
|
||||||
|
}
|
||||||
|
opt := model.Option{
|
||||||
|
Timeout: time.Second * 10,
|
||||||
|
}
|
||||||
|
resp, err := a.api.QueryOrderList(ctx, req, opt)
|
||||||
|
if !a.NoError(err) {
|
||||||
|
a.T().Errorf("=====[TestGenerateH5Link] err: %v", err)
|
||||||
|
}
|
||||||
|
a.T().Logf("=====[TestGenerateH5Link] resp: %+v, err: %v", resp, err)
|
||||||
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package didi_union
|
|||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
// AuthConfig api鉴权参数
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package didi_union
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateLinkRequest 生成推广链接的请求
|
// GenerateLinkRequest 生成推广链接的请求
|
||||||
|
|||||||
@ -5,10 +5,10 @@ import (
|
|||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
||||||
sdkutil "gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
sdkutil "repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ElemeUnionApi 调用第三方平台的api
|
// ElemeUnionApi 调用第三方平台的api
|
||||||
|
|||||||
@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util/pointer"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// api-单元测试
|
// api-单元测试
|
||||||
|
|||||||
@ -5,9 +5,9 @@ import (
|
|||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
// AuthConfig api鉴权参数
|
||||||
|
|||||||
123
platform/elong-hotel/api.go
Normal file
123
platform/elong-hotel/api.go
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
package elong_hotel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"crypto/md5"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"net/url"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ElongHotelApi 同程酒店的api
|
||||||
|
// Api defines the interface of elong_hotel api
|
||||||
|
type ElongHotelApi interface {
|
||||||
|
// GetExternalChannelConfig 获取渠道配置信息
|
||||||
|
GetExternalChannelConfig(ctx context.Context, req GetExternalChannelConfigRequest, env string) (*ExternalChannelConfigResponse, error)
|
||||||
|
// GenerateUrl 生成链接
|
||||||
|
GenerateUrl(ctx context.Context, req GenerateUrlRequest) (string, error)
|
||||||
|
// QueryOrderList 查询订单列表
|
||||||
|
QueryOrderList(ctx context.Context, req QueryOrderListRequest, env string) (*ExternalOrderData, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type elongHotelApiImpl struct {
|
||||||
|
log logx.Logger
|
||||||
|
client *Client
|
||||||
|
}
|
||||||
|
|
||||||
|
func newElongHotelApiImpl(log logx.Logger, client *Client) ElongHotelApi {
|
||||||
|
return &elongHotelApiImpl{
|
||||||
|
log: log,
|
||||||
|
client: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateLink 生成短链
|
||||||
|
func (t *elongHotelApiImpl) GetExternalChannelConfig(ctx context.Context, req GetExternalChannelConfigRequest, env string) (*ExternalChannelConfigResponse, error) {
|
||||||
|
var url string
|
||||||
|
token := t.client.authConfig.Token
|
||||||
|
tn := time.Now()
|
||||||
|
actionTime := tn.Unix()
|
||||||
|
h := md5.New()
|
||||||
|
h.Write([]byte(fmt.Sprintf("%s%d", token, actionTime)))
|
||||||
|
queryArgs := &GetExternalChannelConfigReq{
|
||||||
|
ActionTime: tn.Unix(),
|
||||||
|
Token: token,
|
||||||
|
Code: string(h.Sum(nil)),
|
||||||
|
Trackid: req.Trackid,
|
||||||
|
}
|
||||||
|
args := util.StructToMap(queryArgs)
|
||||||
|
request := &client.HttpRequest{Headers: t.client.headers, QueryArgs: args}
|
||||||
|
response := new(GetExternalChannelConfigResponse)
|
||||||
|
if env == EnvHuidu {
|
||||||
|
url = HDApiDomain + GetLinkUri
|
||||||
|
} else {
|
||||||
|
url = ApiDomain + GetLinkUri
|
||||||
|
}
|
||||||
|
if err := t.client.HttpGet(url, request, &client.HttpResponse{Result: response}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if response.Code != 200 {
|
||||||
|
t.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": response}}).
|
||||||
|
Errorf("[elongHotelApiImpl][GetExternalChannelConfig] response result error: %s", response.Msg)
|
||||||
|
return nil, errors.New(response.Msg)
|
||||||
|
}
|
||||||
|
return response.Data, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateUrl 生成链接
|
||||||
|
func (t *elongHotelApiImpl) GenerateUrl(ctx context.Context, req GenerateUrlRequest) (string, error) {
|
||||||
|
if len(req.ActivityUrl) == 0 {
|
||||||
|
return "", errors.New("url参数不能为空")
|
||||||
|
}
|
||||||
|
u, err := url.Parse(req.ActivityUrl)
|
||||||
|
if err != nil {
|
||||||
|
return "", errors.New("activityUrl不是一个url")
|
||||||
|
}
|
||||||
|
urlParams := u.Query()
|
||||||
|
src := urlParams.Get("src")
|
||||||
|
src, err = url.QueryUnescape(src)
|
||||||
|
if err != nil {
|
||||||
|
return "", errors.New("src参数解析失败")
|
||||||
|
}
|
||||||
|
srcUrl, err := url.Parse(src)
|
||||||
|
if err != nil {
|
||||||
|
return "", errors.New("activityUrl格式不符合要求,src参数不是一个url")
|
||||||
|
}
|
||||||
|
srcParams := srcUrl.Query()
|
||||||
|
srcParams.Add("outUserid", req.Uid)
|
||||||
|
srcParams.Add("outToken", t.client.authConfig.Token)
|
||||||
|
srcUrl.RawQuery = srcParams.Encode()
|
||||||
|
newSrc := url.QueryEscape(srcUrl.String())
|
||||||
|
urlParams.Set("src", newSrc)
|
||||||
|
urlParams.Add("isRefresh", "refresh")
|
||||||
|
u.RawQuery = urlParams.Encode()
|
||||||
|
return u.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryOrderList 查询订单列表
|
||||||
|
func (t *elongHotelApiImpl) QueryOrderList(ctx context.Context, req QueryOrderListRequest, env string) (*ExternalOrderData, error) {
|
||||||
|
var url string
|
||||||
|
args := util.StructToMap(req)
|
||||||
|
request := &client.HttpRequest{Headers: t.client.headers, QueryArgs: args}
|
||||||
|
response := new(GetExternalOrderResp)
|
||||||
|
if env == EnvHuidu {
|
||||||
|
url = HDApiDomain + GetOrderListUri
|
||||||
|
} else {
|
||||||
|
url = ApiDomain + GetOrderListUri
|
||||||
|
}
|
||||||
|
if err := t.client.HttpGet(url, request, &client.HttpResponse{Result: response}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if response.Code != 200 {
|
||||||
|
t.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": response}}).
|
||||||
|
Errorf("[elongHotelApiImpl][QueryOrderList] response result error: %s", response.Msg)
|
||||||
|
return nil, errors.New(response.Msg)
|
||||||
|
}
|
||||||
|
return response.Data, nil
|
||||||
|
}
|
||||||
81
platform/elong-hotel/api_test.go
Normal file
81
platform/elong-hotel/api_test.go
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
package elong_hotel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/suite"
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
// api-单元测试
|
||||||
|
type apiClientSuite struct {
|
||||||
|
suite.Suite
|
||||||
|
api ElongHotelApi
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestApiClient(t *testing.T) {
|
||||||
|
suite.Run(t, new(apiClientSuite))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) SetupSuite() {
|
||||||
|
log := logx.WithContext(context.Background())
|
||||||
|
apiClient := NewApiClient(log, AuthConfig{
|
||||||
|
Token: "dfae91a85341865b",
|
||||||
|
})
|
||||||
|
a.api = apiClient
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) Test_GenerateLink() {
|
||||||
|
req := GetExternalChannelConfigRequest{
|
||||||
|
Trackid: "elong_hotel",
|
||||||
|
}
|
||||||
|
result, err := a.api.GetExternalChannelConfig(context.Background(), req, "huidu")
|
||||||
|
if !a.NoError(err) {
|
||||||
|
a.T().Errorf("========[Test_GenerateLink] response error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resultByte, err := json.Marshal(result)
|
||||||
|
if err != nil {
|
||||||
|
a.T().Errorf("========[Test_GenerateLink] json_marshal error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
a.T().Logf("=====[Test_GenerateLink] result: %s", string(resultByte))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) Test_GenerateUrl() {
|
||||||
|
req := GenerateUrlRequest{
|
||||||
|
ActivityUrl: "/page/home/webview/webview?src=https%3A%2F%2Fmp.elong.com%2Ftenthousandaura%2F%3Factivitycode%3D5fd89a11-7b58-4f5c-8dc9-c360936d4207%26of%3D99810010",
|
||||||
|
Uid: "11111111111111111",
|
||||||
|
}
|
||||||
|
result, err := a.api.GenerateUrl(context.Background(), req)
|
||||||
|
if !a.NoError(err) {
|
||||||
|
a.T().Errorf("========[Test_GenerateUrl] response error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
a.T().Logf("=====[Test_GenerateUrl] result: %s", string(result))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||||
|
req := QueryOrderListRequest{
|
||||||
|
AppId: "",
|
||||||
|
Trackid: "",
|
||||||
|
BeginDate: "2024-07-01 00:00:00",
|
||||||
|
EndDate: "2024-07-01 23:59:59",
|
||||||
|
Update: 1,
|
||||||
|
PageIndex: 0,
|
||||||
|
PageSize: 1,
|
||||||
|
}
|
||||||
|
result, err := a.api.QueryOrderList(context.Background(), req, "huidu")
|
||||||
|
if !a.NoError(err) {
|
||||||
|
a.T().Errorf("========[Test_QueryOrderList] response error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resultByte, err := json.Marshal(result)
|
||||||
|
if err != nil {
|
||||||
|
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
a.T().Logf("=====[Test_QueryOrderList] result: %s", string(resultByte))
|
||||||
|
}
|
||||||
36
platform/elong-hotel/client.go
Normal file
36
platform/elong-hotel/client.go
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package elong_hotel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AuthConfig api鉴权参数
|
||||||
|
type AuthConfig struct {
|
||||||
|
Token string // 分配的token
|
||||||
|
}
|
||||||
|
|
||||||
|
// 连接第三方平台的client
|
||||||
|
type Client struct {
|
||||||
|
log logx.Logger
|
||||||
|
authConfig AuthConfig
|
||||||
|
client.HttpClient
|
||||||
|
headers map[string]string
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewApiClient(log logx.Logger, conf AuthConfig) ElongHotelApi {
|
||||||
|
clt := newClient(log, conf)
|
||||||
|
return newElongHotelApiImpl(log, clt)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newClient(log logx.Logger, conf AuthConfig) *Client {
|
||||||
|
return &Client{
|
||||||
|
log: log,
|
||||||
|
authConfig: conf,
|
||||||
|
HttpClient: client.NewHttpClient(log),
|
||||||
|
headers: map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
26
platform/elong-hotel/consts.go
Normal file
26
platform/elong-hotel/consts.go
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package elong_hotel
|
||||||
|
|
||||||
|
// 相关地址
|
||||||
|
const (
|
||||||
|
SiteDomain = "" // Domain 后台域名
|
||||||
|
SiteUrl = "" // SiteUrl 后台地址
|
||||||
|
DocUrl = "" // DocUrl 文档地址
|
||||||
|
ApiDocUrl = "" // ApiDocUrl api文档地址
|
||||||
|
)
|
||||||
|
|
||||||
|
// header头信息
|
||||||
|
const ()
|
||||||
|
|
||||||
|
// 环境
|
||||||
|
const (
|
||||||
|
EnvProd = "prod" // 正式环境
|
||||||
|
EnvHuidu = "huidu" // 灰度
|
||||||
|
)
|
||||||
|
|
||||||
|
// 接口地址
|
||||||
|
const (
|
||||||
|
HDApiDomain = "https://mp-blindbox-hd.elong.com" // Domain api域名 (灰度环境)
|
||||||
|
ApiDomain = "https://mp-blindbox.elong.com" // api域名(正式环境)
|
||||||
|
GetLinkUri = "/nopaymentorder/externalorder/getExternalChannelConfig" // 生成跳转链接uri
|
||||||
|
GetOrderListUri = "/nopaymentorder/externalorder/getExternalOrder" // 获取订单uri
|
||||||
|
)
|
||||||
1
platform/elong-hotel/sign.go
Normal file
1
platform/elong-hotel/sign.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package elong_hotel
|
||||||
94
platform/elong-hotel/types.go
Normal file
94
platform/elong-hotel/types.go
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
package elong_hotel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"google.golang.org/genproto/googleapis/type/decimal"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CommonResponse struct {
|
||||||
|
Code int32 `json:"code"` // 状态码,200为正常
|
||||||
|
Msg string `json:"msg"` // 返回信息
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成链接请求
|
||||||
|
type GetExternalChannelConfigRequest struct {
|
||||||
|
Trackid string `json:"trackid"` // 跟踪id,排查问题使用,guid即可
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取外部渠道配置请求
|
||||||
|
type GetExternalChannelConfigReq struct {
|
||||||
|
ActionTime int64 `json:"action_time"` // 必传,请求时间戳
|
||||||
|
Token string `json:"token"` // 必传,token
|
||||||
|
Code string `json:"code"` // 必传,校验参数
|
||||||
|
Trackid string `json:"trackid"` // 必传,跟踪id,排查问题使用,guid即可
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取外部渠道配置响应
|
||||||
|
type GetExternalChannelConfigResponse struct {
|
||||||
|
CommonResponse
|
||||||
|
Data *ExternalChannelConfigResponse `json:"data"` // 数据
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取外部渠道配置数据
|
||||||
|
type ExternalChannelConfigResponse struct {
|
||||||
|
ActivityUrl string `json:"activityUrl"` // 渠道方合作页地址
|
||||||
|
AppId string `json:"appId"` // appId,接口查询验证使用
|
||||||
|
AppSecret string `json:"appSecret"` // appSecret,密钥验证使用
|
||||||
|
GetOrderServiceUrl string `json:"getOrderServiceUrl"` // 渠道方主动查询地址
|
||||||
|
PushOrderServiceUrl string `json:"pushOrderServiceUrl"` // 渠道方推送地址
|
||||||
|
OtherActivityUrls []*OtherActivityUrl `json:"otherActivityUrls"` // 其他的渠道方合作页地址
|
||||||
|
}
|
||||||
|
|
||||||
|
// 其他的渠道方合作页地址
|
||||||
|
type OtherActivityUrl struct {
|
||||||
|
Name string `json:"name"` // 合作页地址名称
|
||||||
|
ActivityUrl string `json:"activityUrl"` // 渠道方合作页地址
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateUrlReq 生成链接的请求
|
||||||
|
type GenerateUrlRequest struct {
|
||||||
|
ActivityUrl string `json:"activityUrl"` // 活动url
|
||||||
|
Uid string `json:"uid"` // 用户id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取外部订单请求
|
||||||
|
type QueryOrderListRequest struct {
|
||||||
|
AppId string `json:"appId"` // 必传,分配token查询接口提供的appId(getExternalChannelConfig接口返回的appId)
|
||||||
|
Trackid string `json:"trackid"` // 必传,跟踪id,排查问题使用,guid即可
|
||||||
|
BeginDate string `json:"begin_date"` // 订单更新时间查询起始,精确到秒, yyyy-MM-dd HH:mm:ss(除了传订单号外,其他查询必传)
|
||||||
|
EndDate string `json:"end_date"` // 订单更新时间查询结束,精确到秒, yyyy-MM-dd HH:mm:ss(除了传订单号外,其他查询必传)
|
||||||
|
OrderId string `json:"order_id"` // 指定订单号查询,返回该订单的最新详情
|
||||||
|
Update int32 `json:"update"` // 0:仅已支付的订单, 1:所有状态订单, 默认查所有传1
|
||||||
|
PageIndex int32 `json:"page_index"` // 分页index,从0开始(除了传订单号外,其他查询必传)
|
||||||
|
PageSize int32 `json:"page_size"` // 分页条数(除了传订单号外,其他查询必传)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取外部订单响应
|
||||||
|
type GetExternalOrderResp struct {
|
||||||
|
CommonResponse
|
||||||
|
Data *ExternalOrderData `json:"data"` // 数据
|
||||||
|
}
|
||||||
|
|
||||||
|
type ExternalOrderData struct {
|
||||||
|
ExternalOrderDataList []*ExternalOrder `json:"externalOrderDataList"` // 订单数据
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单详情
|
||||||
|
type ExternalOrder struct {
|
||||||
|
ExtendInfo string `json:"extendInfo"` // 订单附加信息json格式
|
||||||
|
HotelCityName string `json:"hotelCityName"` // 酒店所在城市名称
|
||||||
|
HotelName string `json:"hotelName"` // 酒店名称
|
||||||
|
OrderCheckIn string `json:"orderCheckIn"` // 入住日期
|
||||||
|
OrderCheckOut string `json:"orderCheckOut"` // 离店时间
|
||||||
|
OrderCreateTime string `json:"orderCreateTime"` // 订单创建时间date-time
|
||||||
|
OrderModifyTime string `json:"orderModifyTime"` // 订单更新时间date-time
|
||||||
|
OrderNo string `json:"orderNo"` // 订单号
|
||||||
|
OrderPayAmount decimal.Decimal `json:"orderPayAmount"` // 订单实付金额
|
||||||
|
OrderPayTime string `json:"orderPayTime"` // 订单支付时间 date-time
|
||||||
|
OrderStatus int32 `json:"orderStatus"` // 订单组推送的订单状态(1: 已支付 2:已离店 3:已取消)
|
||||||
|
OrderCommission decimal.Decimal `json:"orderCommission"` // 订单佣金
|
||||||
|
Uid string `json:"uid"` // 第三方用户id
|
||||||
|
HotelProvinceName string `json:"hotelProvinceName"` // 酒店所在省份
|
||||||
|
RoomNights int32 `json:"roomNights"` // 入住间夜
|
||||||
|
RoomCount int32 `json:"roomCount"` // 入住房间数量
|
||||||
|
HourRoom int32 `json:"hourRoom"` // 是否钟点房1:是 0:不是 -1:旧数据
|
||||||
|
}
|
||||||
89
platform/jutuike/api.go
Normal file
89
platform/jutuike/api.go
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
package jutuike
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
"github.com/zywaited/xcopy"
|
||||||
|
|
||||||
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
// JutuikeApi 美团-美天赚
|
||||||
|
// Api defines the interface of jutuike api
|
||||||
|
type JutuikeApi interface {
|
||||||
|
// GenerateLink 生成推广链接
|
||||||
|
GenerateLink(ctx context.Context, req GenerateLinkRequest) (*GenerateLinkData, error)
|
||||||
|
// QueryOrderList 查询订单列表
|
||||||
|
QueryOrderList(ctx context.Context, req QueryOrderListRequest) (*QueryOrderListData, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type jutuikeApiImpl struct {
|
||||||
|
log logx.Logger
|
||||||
|
client *Client
|
||||||
|
}
|
||||||
|
|
||||||
|
func newJutuikeApiImpl(log logx.Logger, client *Client) JutuikeApi {
|
||||||
|
return &jutuikeApiImpl{
|
||||||
|
log: log,
|
||||||
|
client: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateLink 生成推广链接
|
||||||
|
func (a *jutuikeApiImpl) GenerateLink(ctx context.Context, req GenerateLinkRequest) (*GenerateLinkData, error) {
|
||||||
|
if req.ActId == 0 || len(req.Sid) == 0 {
|
||||||
|
return nil, errors.New("请求参数actId或sid不能为空")
|
||||||
|
}
|
||||||
|
if len(req.ApiKey) == 0 {
|
||||||
|
req.ApiKey = a.client.authConfig.ApiKey
|
||||||
|
}
|
||||||
|
args := util.StructToMap(req)
|
||||||
|
request := &client.HttpRequest{Headers: a.client.headers, QueryArgs: args}
|
||||||
|
response := new(GenerateLinkResponse)
|
||||||
|
if err := a.client.HttpGet(GetLinkUrl, request, &client.HttpResponse{Result: response}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if response.Code != 1 {
|
||||||
|
a.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": response}}).
|
||||||
|
Errorf("[jutuikeApiImpl][GenerateLink] response result error: %s", response.Msg)
|
||||||
|
return nil, errors.New(response.Msg)
|
||||||
|
}
|
||||||
|
result := response.Data.(GenerateLinkData)
|
||||||
|
return &result, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryOrderList 查询订单列表
|
||||||
|
func (a *jutuikeApiImpl) QueryOrderList(ctx context.Context, req QueryOrderListRequest) (*QueryOrderListData, error) {
|
||||||
|
if len(req.StartTime) == 0 || len(req.EndTime) == 0 {
|
||||||
|
return nil, errors.New("请求参数start_time或end_time为必传")
|
||||||
|
}
|
||||||
|
if _, err := time.Parse(time.DateTime, req.StartTime); err != nil {
|
||||||
|
return nil, errors.New("开始时间start_time时间格式错误")
|
||||||
|
}
|
||||||
|
if _, err := time.Parse(time.DateTime, req.EndTime); err != nil {
|
||||||
|
return nil, errors.New("结束时间end_time时间格式错误")
|
||||||
|
}
|
||||||
|
if len(req.ApiKey) == 0 {
|
||||||
|
req.ApiKey = a.client.authConfig.ApiKey
|
||||||
|
}
|
||||||
|
args := util.StructToMap(req)
|
||||||
|
request := &client.HttpRequest{Headers: a.client.headers, BodyArgs: args}
|
||||||
|
response := new(QueryOrderListResponse)
|
||||||
|
if err := a.client.HttpPost(GetOrderListUrl, request, &client.HttpResponse{Result: response}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if response.Code != 1 {
|
||||||
|
a.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": response}}).
|
||||||
|
Errorf("[jutuikeApiImpl][QueryOrderList] response result error: %s", response.Msg)
|
||||||
|
return nil, errors.New(response.Msg)
|
||||||
|
}
|
||||||
|
var responseData *QueryOrderListData
|
||||||
|
if err := xcopy.Copy(&responseData, response.Data); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return responseData, nil
|
||||||
|
}
|
||||||
66
platform/jutuike/api_test.go
Normal file
66
platform/jutuike/api_test.go
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
package jutuike
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/suite"
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
// api-单元测试
|
||||||
|
type apiClientSuite struct {
|
||||||
|
suite.Suite
|
||||||
|
api JutuikeApi
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestApiClient(t *testing.T) {
|
||||||
|
suite.Run(t, new(apiClientSuite))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) SetupSuite() {
|
||||||
|
log := logx.WithContext(context.Background())
|
||||||
|
apiClient := NewApiClient(log, AuthConfig{
|
||||||
|
ApiKey: "IyftVpzDVqDIRDqPZByW5xVpj9MgZSB7",
|
||||||
|
})
|
||||||
|
a.api = apiClient
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) Test_GenerateLink() {
|
||||||
|
req := GenerateLinkRequest{
|
||||||
|
ActId: 3,
|
||||||
|
Sid: "f3a8c1",
|
||||||
|
}
|
||||||
|
result, err := a.api.GenerateLink(context.Background(), req)
|
||||||
|
if !a.NoError(err) {
|
||||||
|
a.T().Errorf("========[Test_GenerateLink] response error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resultByte, err := json.Marshal(result)
|
||||||
|
if err != nil {
|
||||||
|
a.T().Errorf("========[Test_GenerateLink] json_marshal error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
a.T().Logf("=====[Test_GenerateLink] result: %s", string(resultByte))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||||
|
req := QueryOrderListRequest{
|
||||||
|
StartTime: time.Unix(1718726400, 0).Format(time.DateTime),
|
||||||
|
EndTime: time.Unix(1718812799, 0).Format(time.DateTime),
|
||||||
|
PageSize: 1,
|
||||||
|
}
|
||||||
|
result, err := a.api.QueryOrderList(context.Background(), req)
|
||||||
|
if !a.NoError(err) {
|
||||||
|
a.T().Errorf("========[Test_QueryOrderList] response error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resultByte, err := json.Marshal(result)
|
||||||
|
if err != nil {
|
||||||
|
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
a.T().Logf("================[Test_QueryOrderList] result: %s", string(resultByte))
|
||||||
|
}
|
||||||
36
platform/jutuike/client.go
Normal file
36
platform/jutuike/client.go
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package jutuike
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AuthConfig api鉴权参数
|
||||||
|
type AuthConfig struct {
|
||||||
|
ApiKey string // api key
|
||||||
|
}
|
||||||
|
|
||||||
|
// 连接第三方平台的client
|
||||||
|
type Client struct {
|
||||||
|
log logx.Logger
|
||||||
|
authConfig AuthConfig
|
||||||
|
client.HttpClient
|
||||||
|
headers map[string]string
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewApiClient(log logx.Logger, conf AuthConfig) JutuikeApi {
|
||||||
|
clt := newClient(log, conf)
|
||||||
|
return newJutuikeApiImpl(log, clt)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newClient(log logx.Logger, conf AuthConfig) *Client {
|
||||||
|
return &Client{
|
||||||
|
log: log,
|
||||||
|
authConfig: conf,
|
||||||
|
HttpClient: client.NewHttpClient(log),
|
||||||
|
headers: map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
18
platform/jutuike/consts.go
Normal file
18
platform/jutuike/consts.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package jutuike
|
||||||
|
|
||||||
|
// 相关地址
|
||||||
|
const (
|
||||||
|
SiteDomain = "https://pub.jutuike.com" // Domain 后台域名
|
||||||
|
SiteUrl = "https://pub.jutuike.com/login" // SiteUrl 后台地址
|
||||||
|
DocUrl = "https://www.jutuike.com/document" // DocUrl 文档地址
|
||||||
|
ApiDocUrl = "https://www.jutuike.com/doc/48" // ApiDocUrl api文档地址
|
||||||
|
)
|
||||||
|
|
||||||
|
// 接口地址
|
||||||
|
const (
|
||||||
|
ApiDomain = "http://api.jutuike.com" // Domain api域名
|
||||||
|
GetLinkUri = "/union/act"
|
||||||
|
GetOrderListUri = "/union/orders"
|
||||||
|
GetLinkUrl = ApiDomain + GetLinkUri
|
||||||
|
GetOrderListUrl = ApiDomain + GetOrderListUri
|
||||||
|
)
|
||||||
83
platform/jutuike/types.go
Normal file
83
platform/jutuike/types.go
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
package jutuike
|
||||||
|
|
||||||
|
type GenerateLinkRequest struct {
|
||||||
|
ApiKey string `json:"apikey"` // 必传 api key
|
||||||
|
ActId int64 `json:"act_id"` // 必传 活动id
|
||||||
|
Sid string `json:"sid"` // 必传 自定义参数
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateLinkResponse 生成推广链接响应
|
||||||
|
type GenerateLinkResponse struct {
|
||||||
|
Code int32 `json:"code"` // 错误码:0-错误,1-成功
|
||||||
|
Msg string `json:"msg"` // 错误消息
|
||||||
|
Data any `json:"data"` // 数据结构,注意如果错误码为0,则data返回的是[], 如果为1,返回的是GenerateLinkData
|
||||||
|
}
|
||||||
|
|
||||||
|
type GenerateLinkData struct {
|
||||||
|
H5 string `json:"h5"` // 推广短链接(部分活动没有,请注意判断)
|
||||||
|
WeAppInfo WeAppInfo `json:"we_app_info"` // 小程序信息(部分活动没有,请注意判断)
|
||||||
|
ActName string `json:"act_name"` // 活动名称
|
||||||
|
LongH5 string `json:"long_h5"` // 推广长链接(部分活动没有,请注意判断)
|
||||||
|
}
|
||||||
|
|
||||||
|
type WeAppInfo struct {
|
||||||
|
AppId string `json:"app_id"` // 小程序ID
|
||||||
|
PagePath string `json:"page_path"` // 小程序路径
|
||||||
|
MiniCode string `json:"miniCode"` // 小程序码(部分活动没有,请注意判断)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单列表请求
|
||||||
|
type QueryOrderListRequest struct {
|
||||||
|
ApiKey string `json:"apikey"` // 是 api key
|
||||||
|
StartTime string `json:"start_time"` // 是 2021-06-05 00:00:00 开始时间与结束时间不能超过1小时
|
||||||
|
EndTime string `json:"end_time"` // 是 2021-06-05 00:00:00 结束时间与开始时间不能超过1小时
|
||||||
|
QueryType int32 `json:"query_type,omitempty"` // 否 1 1: 按支付时间 2:按更新时间 3:创建时间 ,默认:3
|
||||||
|
Sid string `json:"sid,omitempty"` // 否 自定义参数跟单
|
||||||
|
BrandId int32 `json:"brand_id,omitempty"` // 否 1 品牌id 1 美团 2 饿了么 3 拼多多 4 京东 5 肯德基 6 电影 7 麦当劳 8 话费充值 9 百果园 10 奈雪的茶 11 瑞幸咖啡 12 星巴克 13 喜茶 14 唯品会 15 滴滴/花小猪 16 汉堡王 17 高德打车 18 电费充值 19 会员充值 20 特价快递 21 联联周边游 22 抖音联盟 23 必胜客 24 旅划算 25 大牌餐券 26 千千惠生活 27 流量卡 28 同程出行 29 华莱士 30 T3出行 31 景点门票 32 淘宝
|
||||||
|
Status int32 `json:"status,omitempty"` // 否 1 订单统一状态,0:未付款 1:已付款 2:待结算 3:已结算 4:无效订单
|
||||||
|
OrderSn string `json:"order_sn,omitempty"` // 否 1234567 订单号
|
||||||
|
RelationFlagName string `json:"relation_flag_name,omitempty"` // 否 第三方渠道标识
|
||||||
|
Page int32 `json:"page,omitempty"` // 否 1 页码 默认 1
|
||||||
|
PageSize int32 `json:"pageSize,omitempty"` // 否 20 每页显示多少 默认 20 最大 100
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单列表响应
|
||||||
|
type QueryOrderListResponse struct {
|
||||||
|
Code int32 `json:"code"` // 错误码:0-错误,1-成功
|
||||||
|
Msg string `json:"msg"` // 错误消息
|
||||||
|
Data any `json:"data"` // 数据结构,注意如果错误码为0,则data返回的是[], 如果为1,QueryOrderListData
|
||||||
|
}
|
||||||
|
|
||||||
|
type QueryOrderListData struct {
|
||||||
|
Total int32 `json:"total"` // 总数
|
||||||
|
PerPage int32 `json:"per_page"` // 上一页
|
||||||
|
CurrentPage int32 `json:"current_page"` // 当前页码
|
||||||
|
LastPage int32 `json:"last_page"` // 下一页
|
||||||
|
Data []*OrderItem `json:"data"` // 数据
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderItem struct {
|
||||||
|
ActName string `json:"act_name"` // 美团外卖 活动名称
|
||||||
|
ActId int32 `json:"act_id"` // 活动id,jd:19 、考拉:35、 pdd:14 、 淘宝:40 、vip:39 、47-高德打车 对应该接口 https://www.jutuike.com/doc/34
|
||||||
|
Sid string `json:"sid"` // 123456 渠道标识
|
||||||
|
PubId int32 `json:"pub_id"` // 推广者id,平台用户唯一id
|
||||||
|
JtkShareRate string `json:"jtk_share_rate"` // 佣金比例,0.1 则代表10% (实际佣金比率 = 比例x100)
|
||||||
|
JtkShareFee string `json:"jtk_share_fee"` // 佣金, 如1.2
|
||||||
|
OrderSn string `json:"order_sn"` // 订单号,如12345678
|
||||||
|
OrderTitle string `json:"order_title"` // 北京烤鸭 商品名称
|
||||||
|
CreateTime string `json:"create_time"` // 2021-06-05 21:41:52 下单时间
|
||||||
|
PayTime string `json:"pay_time"` // 2021-06-05 21:41:52 付款时间
|
||||||
|
ModifiedTime string `json:"modified_time"` // 2021-06-05 21:41:52 最后一次更新时间
|
||||||
|
OrderPrice string `json:"order_price"` // 商品单价
|
||||||
|
PayPrice string `json:"pay_price"` // 实际付款金额
|
||||||
|
Status int32 `json:"status"` // 订单统一状态,0:未付款 1:已付款 2:待结算 3:已结算 4:无效订单
|
||||||
|
StatusDesc string `json:"status_desc"` // 状态描述,如已付款
|
||||||
|
Extension *OrderExtension `json:"extension"` // 扩展参数,可根据需要解析
|
||||||
|
BrandId int32 `json:"brand_id"` // 品牌id 1 美团 2 饿了么 3 拼多多 4 京东 5 肯德基 6 电影 7 麦当劳 8 话费充值 9 百果园 10 奈雪的茶 11 瑞幸咖啡 12 星巴克 13 喜茶 14 唯品会 15 滴滴/花小猪 16 汉堡王 17 高德打车 18 电费充值 19 会员充值 20 特价快递 21 联联周边游 22 抖音联盟 23 必胜客 24 旅划算 25 大牌餐券 26 千千惠生活 27 流量卡 28 同程出行 29 华莱士 30 T3出行 31 景点门票 32 淘宝
|
||||||
|
InvalidReason string `json:"invalid_reason"` // 失效原因
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderExtension struct {
|
||||||
|
PicUrl string `json:"pic_url"` // 图片url
|
||||||
|
ShopName string `json:"shop_name"` // 店铺名
|
||||||
|
}
|
||||||
@ -8,8 +8,8 @@ import (
|
|||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"github.com/zeromicro/go-zero/core/trace"
|
"github.com/zeromicro/go-zero/core/trace"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Api 调用第三方平台的api
|
// Api 调用第三方平台的api
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package meituan_csr
|
|||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
// AuthConfig api鉴权参数
|
||||||
|
|||||||
@ -7,12 +7,12 @@ import (
|
|||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MeituanMediaApi 美团-美天赚
|
// MeituanMediaApi 美团-美天赚
|
||||||
// Api defines the interface of t3_union api
|
// Api defines the interface of meituan_media api
|
||||||
type MeituanMediaApi interface {
|
type MeituanMediaApi interface {
|
||||||
// Sign 签名
|
// Sign 签名
|
||||||
Sign(methodType string, url string, data map[string]interface{}) string
|
Sign(methodType string, url string, data map[string]interface{}) string
|
||||||
@ -79,7 +79,7 @@ func (a *meituanMediaApiImpl) QueryOrderList(ctx context.Context, req QueryOrder
|
|||||||
}
|
}
|
||||||
if response.Code != 0 {
|
if response.Code != 0 {
|
||||||
a.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": response}}).
|
a.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": response}}).
|
||||||
Errorf("[t3UnionApiImpl][QueryOrderList] response result error: %s", response.Message)
|
Errorf("[meituanMediaApiImpl][QueryOrderList] response result error: %s", response.Message)
|
||||||
return nil, errors.New(response.Message)
|
return nil, errors.New(response.Message)
|
||||||
}
|
}
|
||||||
return response.Data, nil
|
return response.Data, nil
|
||||||
@ -39,7 +39,9 @@ func (a *apiClientSuite) Test_Sign() {
|
|||||||
|
|
||||||
func (a *apiClientSuite) Test_GenerateLink() {
|
func (a *apiClientSuite) Test_GenerateLink() {
|
||||||
req := GenerateLinkRequest{
|
req := GenerateLinkRequest{
|
||||||
//LinkType: 1,
|
LinkType: 1,
|
||||||
|
ActId: "7",
|
||||||
|
Sid: "f3a8c1",
|
||||||
}
|
}
|
||||||
result, err := a.api.GenerateLink(context.Background(), req)
|
result, err := a.api.GenerateLink(context.Background(), req)
|
||||||
if !a.NoError(err) {
|
if !a.NoError(err) {
|
||||||
@ -3,7 +3,7 @@ package meituan_media
|
|||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
// AuthConfig api鉴权参数
|
||||||
@ -2,9 +2,9 @@ package meituan_media
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
|
"crypto/md5"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/hex"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -12,7 +12,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Sign struct {
|
type Sign struct {
|
||||||
@ -31,8 +31,9 @@ func (s *Sign) BuildHeader(methodType string, uri string, data map[string]any) m
|
|||||||
headers := map[string]string{
|
headers := map[string]string{
|
||||||
SCaApp: s.AppKey, // 应用app_key
|
SCaApp: s.AppKey, // 应用app_key
|
||||||
SCaTimestamp: fmt.Sprintf("%d", time.Now().UnixMilli()), // 请求发起时间戳(毫秒),有效时1分钟
|
SCaTimestamp: fmt.Sprintf("%d", time.Now().UnixMilli()), // 请求发起时间戳(毫秒),有效时1分钟
|
||||||
SCaSignatureHeaders: "S-Ca-App,S-Ca-Timestamp", // 将需要签名的header
|
SCaSignatureHeaders: "S-Ca-Timestamp,S-Ca-App", // 将需要签名的header
|
||||||
ContentMd5: s.contentMD5(methodType, data), // body数据Md5加密
|
ContentMd5: s.contentMD5(methodType, data), // body数据Md5加密
|
||||||
|
//"Content-Type": "application/json",
|
||||||
}
|
}
|
||||||
headers[SCaSignature] = s.GetSign(methodType, uri, data, headers)
|
headers[SCaSignature] = s.GetSign(methodType, uri, data, headers)
|
||||||
return headers
|
return headers
|
||||||
@ -43,10 +44,10 @@ func (s *Sign) GetSign(methodType string, uri string, data map[string]any, signH
|
|||||||
contentMD5 := s.contentMD5(methodType, data)
|
contentMD5 := s.contentMD5(methodType, data)
|
||||||
headers := s.headers(signHeaders)
|
headers := s.headers(signHeaders)
|
||||||
url := s.url(methodType, uri, data)
|
url := s.url(methodType, uri, data)
|
||||||
strSign := httpMethod + `\n` + contentMD5 + `\n` + headers + url
|
strSign := httpMethod + "\n" + contentMD5 + "\n" + headers + url
|
||||||
hm := hmac.New(sha256.New, []byte(s.AppSecret))
|
hm := hmac.New(sha256.New, []byte(s.AppSecret))
|
||||||
hm.Write([]byte(strSign))
|
hm.Write([]byte(strSign))
|
||||||
signStr := base64.StdEncoding.EncodeToString([]byte(hex.EncodeToString(hm.Sum([]byte("")))))
|
signStr := base64.StdEncoding.EncodeToString(hm.Sum(nil))
|
||||||
return signStr
|
return signStr
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +61,9 @@ func (s *Sign) contentMD5(methodType string, data map[string]any) string {
|
|||||||
methodType = s.httpMethod(methodType)
|
methodType = s.httpMethod(methodType)
|
||||||
if (methodType == http.MethodPost || methodType == http.MethodPut) && data != nil {
|
if (methodType == http.MethodPost || methodType == http.MethodPut) && data != nil {
|
||||||
dataByte, _ := json.Marshal(data)
|
dataByte, _ := json.Marshal(data)
|
||||||
return base64.StdEncoding.EncodeToString([]byte(util.Md5String(string(dataByte))))
|
h := md5.New()
|
||||||
|
h.Write(dataByte)
|
||||||
|
return base64.StdEncoding.EncodeToString(h.Sum(nil))
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@ -79,7 +82,7 @@ func (s *Sign) headers(signHeaders map[string]string) string {
|
|||||||
sortData.Sort()
|
sortData.Sort()
|
||||||
|
|
||||||
for _, k := range sortData {
|
for _, k := range sortData {
|
||||||
str += k + ":" + signHeaders[k] + `\n`
|
str += k + ":" + signHeaders[k] + "\n"
|
||||||
}
|
}
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
92
platform/meituan-media/types.go
Normal file
92
platform/meituan-media/types.go
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
package meituan_media
|
||||||
|
|
||||||
|
// GenerateLinkRequest 生成推广链接请求
|
||||||
|
type GenerateLinkRequest struct {
|
||||||
|
LinkType int32 `json:"linkType"` // 必填 链接类型,枚举值:1 H5长链接;2 H5短链接;3 deeplink(唤起)链接;4 微信小程序唤起路径
|
||||||
|
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
|
||||||
|
ActId string `json:"actId,omitempty"` // 非必填 活动物料ID,我要推广-活动推广中第一列的id信息(和商品id、活动链接三选一填写,不能全填)
|
||||||
|
SkuViewId string `json:"skuViewId,omitempty"` // 非必填 商品id,对商品查询接口返回的skuViewid(和活动物料ID、活动链接三选一,不能全填)
|
||||||
|
Sid string `json:"sid,omitempty"` // 非必填 二级媒体身份标识,用于渠道效果追踪,限制64个字符,仅支持英文、数字和下划线
|
||||||
|
Text string `json:"text,omitempty"` // 非必填 只支持到家外卖商品券、买菜业务类型链接和活动物料链接。活动链接,即想要推广的目标链接,出参会返回成自己可推的链接,限定为当前可推广的活动链接或者商品券链接,请求内容尽量保持在200字以内,文本中仅存在一个http协议头的链接
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateLinkResponse 生成推广链接响应
|
||||||
|
type GenerateLinkResponse struct {
|
||||||
|
Code int32 `json:"code"` // 响应码,0成功,其他失败
|
||||||
|
Message string `json:"message"` // 响应文案
|
||||||
|
Data string `json:"data"` // 返回对应的推广链接,这里的链接才能实现跟单计佣
|
||||||
|
SkuViewId string `json:"skuViewId"` // 若用text进行入参取链,且返回的推广链接为商品券链接,则返回对应商品的展示ID,可以根据该ID查商品券接口获取对应的展示信息和佣金信息
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryOrderListRequest 查询订单列表请求
|
||||||
|
type QueryOrderListRequest struct {
|
||||||
|
Platform int32 `json:"platform,omitempty"` // 非必填 商品所属业务一级分类类型:1 到家及其他业务类型,2 到店业务类型(包含到店美食、休闲生活、酒店、门票);不填则默认1
|
||||||
|
BusinessLine []int32 `json:"businessLine,omitempty"` // 非必填 业务线标识;1)当platform为1,选择到家及其他业务类型时,业务线枚举为1:外卖订单 WAIMAI 2:闪购红包 3:酒旅 4:美团电商订单(团好货) 5:医药 6:拼好饭 7:商品超值券包 COUPON 8:买菜 MAICAI 11:闪购商品;不传则默认传空表示非售卖券包订单类型的全部查询。若输入参数含7 商品超值券包,则只返回商品超值券包订单;2)当platform为2,选择到店业务类型 时,业务线枚举1:到餐 2:到综 3:酒店 4:门票,不填则默认传1
|
||||||
|
ActId int64 `json:"actId,omitempty"` // 非必填 活动物料id,我要推广-活动推广中第一列的id信息,不传则返回所有actId的数据,建议查询订单时传入actId
|
||||||
|
Sid string `json:"sid,omitempty"` // 非必填 二级推广位id,最长64位,不传则返回所有sid的数据
|
||||||
|
OrderId string `json:"orderId,omitempty"` // 非必填 订单id,入参后可与业务线标识businessLine配合使用,输入的orderId需要与businessLine能对应上。举例:如查询商品超值券包订单时orderId传券包订单号,businessLine传7;除此以外其他查询筛选条件不生效,不传业务线标识businessLine则默认仅查非券包订单
|
||||||
|
StartTime int32 `json:"startTime,omitempty"` // 非必填 查询时间类型对应的查询开始时间,10位时间戳表示,单位秒
|
||||||
|
EndTime int32 `json:"endTime,omitempty"` // 非必填 查询时间类型对应的查询结束时间,10位时间戳表示,单位秒
|
||||||
|
Page int32 `json:"page,omitempty"` // 非必填 页码,默认1,从1开始,若searchType选择2,本字段必须传1,若不传参数默认1
|
||||||
|
Limit int32 `json:"limit,omitempty"` // 非必填 每页限制条数,默认100,最大支持100
|
||||||
|
QueryTimeType int32 `json:"queryTimeType,omitempty"` // 非必填 查询时间类型,枚举值, 1 按订单支付时间查询, 2 按照更新时间查询, 默认为1
|
||||||
|
TradeType int32 `json:"tradeType,omitempty"` // 非必填 交易类型,1表示CPS,2表示CPA
|
||||||
|
ScrollId string `json:"scrollId,omitempty"` // 非必填 分页id,当searchType选择2逐页查询时,本字段为必填。若不填写,默认查询首页。取值为上一页查询时出参的scrollId字段
|
||||||
|
SearchType int32 `json:"searchType,omitempty"` // 非必填 订单分页查询方案选择,不填则默认为1。1 分页查询(最多能查询到1万条订单),当选择本查询方案,page参数不能为空。此查询方式后续不再维护,建议使用2逐页查询。2 逐页查询(不限制查询订单数,只能逐页查询,不能指定页数),当选择本查询方案,需配合scrollId参数使用
|
||||||
|
CityNames []string `json:"cityNames,omitempty"` // 非必填 可输入城市名称圈定特定城市的订单,单次最多查询10个城市(英文逗号分隔)。不传则默认全部城市订单。 注:如需确认城市具体名称,可参考后台订单明细页的城市筛选项,或参考具体活动的城市命名。目前只支持到家业务类型-商品超值券包业务线。
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryOrderListResponse 查询订单列表响应
|
||||||
|
type QueryOrderListResponse struct {
|
||||||
|
Code int `json:"code"` // 响应码,0成功,其他值为失败
|
||||||
|
Message string `json:"message"` // 响应文案
|
||||||
|
Data *QueryOrderData `json:"data"` // 响应结果信息
|
||||||
|
}
|
||||||
|
|
||||||
|
type QueryOrderData struct {
|
||||||
|
ActId int64 `json:"actId"` // 活动物料id,我要推广-活动推广中第一列的id信息
|
||||||
|
SkuCount int32 `json:"skuCount"` // 查询返回本页的数量合计(无实际使用场景,若查询订单购买商品数可以看返回的dataList中skuCount)
|
||||||
|
ScrollId string `json:"scrollId"` // 分页id,当searchType选择2逐页查询时,出参会返回本字段。用于下一页查询的scrollId字段入参使用
|
||||||
|
DataList []*OrderItem `json:"dataList"` // 数据列表
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderItem struct {
|
||||||
|
BusinessLine int32 `json:"businessLine"` // 业务线,同入参枚举说明
|
||||||
|
OrderId string `json:"orderId"` // 订单ID
|
||||||
|
PayTime int64 `json:"payTime"` // 订单支付时间
|
||||||
|
PayPrice string `json:"payPrice"` // 订单支付价格。针对到餐、到综、酒店、闪购、医药业务类型,为父订单的支付价格,单位元
|
||||||
|
UpdateTime int64 `json:"updateTime"` // 订单最近一次的更新时间。到家外卖商品券、到家医药、到家闪购商品业务、到店到餐、到综、酒店类型,订单时间为用户买券包的更新时间,非每张券的更新时间。针对以上业务类型,建议查询单张券的更新时间
|
||||||
|
CommissionRate string `json:"commissionRate"` // 订单预估佣金比例,300表示3%
|
||||||
|
Profit string `json:"profit"` // 订单整体的预估佣金收入,单位元,1.60表示1.6元
|
||||||
|
CpaProfit string `json:"cpaProfit"` // cpa类型的预估佣金收入,单位元,6.50表示6.5元
|
||||||
|
Sid string `json:"sid"` // 二级媒体身份标识,用于渠道效果追踪
|
||||||
|
ProductId string `json:"productId"` // 产品ID,对应商品查询接口的skuViewId,目前只支持到家外卖商品券、到家医药、到家闪购商品业务、到店业务类型
|
||||||
|
ProductName string `json:"productName"` // 产品名称,外卖订单展示店铺名称,到店取单个商品券的名称、其他展示全部商品名称
|
||||||
|
OrderDetail []*OrderDetail `json:"orderDetail"` // 订单详情,只支持到家外卖商品券、到家医药、到家闪购商品业务、到店到餐、到综、酒店类型返回数据
|
||||||
|
RefundPrice string `json:"refundPrice"` // 只对非到店到餐、非到综、非酒店业务类型有效。订单维度退款价格,该笔订单用户发生退款行为时的退款计佣金额之和,超值券包订单本期不返回退款数据,单位元
|
||||||
|
RefundTime string `json:"refundTime"` // 只对非到店到餐、非到综、非酒店业务类型有效。订单维度最新一次发生退款的时间;超值券包订单本期不返回退款数据,单位元
|
||||||
|
RefundProfit string `json:"refundProfit"` // 只对非到店到餐、非到综、非酒店业务类型有效。订单维度退款预估佣金,该笔订单用户发生退款行为时的退款预估佣金金额之和;超值券包订单本期不返回退款数据,单位元
|
||||||
|
CpaRefundProfit string `json:"cpaRefundProfit"` // cpa退款预估佣金,单位元
|
||||||
|
Status string `json:"status"` // 表示订单维度状态,枚举有 2:付款(如果是CPA订单则表示奖励已创建) 3:完成 4:取消 5:风控 6:结算
|
||||||
|
TradeType int32 `json:"tradeType"` // 交易类型,1:cps,2:cpa
|
||||||
|
ActId int64 `json:"actId"` // 活动物料id,我要推广-活动推广中第一列的id信息
|
||||||
|
Appkey string `json:"appkey"` // 归因到的appKey,对应取链时入参的appkey
|
||||||
|
SkuCount int32 `json:"skuCount"` // 表示sku数量,团好货和券包类型的CPS订单返回有值,其余类型订单不返回该值
|
||||||
|
CityName string `json:"cityName"` // 订单所属的城市,目前支持二级城市粒度。目前只支持到家业务类型-商品超值券包业务线。
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单详情
|
||||||
|
type OrderDetail struct {
|
||||||
|
CouponStatus string `json:"couponStatus"` // 非必填 本期只有到到家外卖商品券、到家医药、到家闪购商品业务、到店到餐、到综、酒店业务类型展示订单明细,表示商品券/子订单推广计佣状态,1、付款,2、完成(或券已核销),3、结算,4、失效(含取消或风控的情况)
|
||||||
|
ItemOrderId string `json:"itemOrderId"` // 非必填 针对到店到餐、到综、酒店商品券,返回商品券的子订单号。其他业务类型不返回
|
||||||
|
FinishTime string `json:"finishTime"` // 非必填 1、针对到家外卖商品券,返回商品券核销完成履约的实物菜品订单号对应的完成时间;2、针对到家医药&闪购商品,返回商品订单完成时间;3、针对到店到餐、到综、酒店子订单,返回子订单对应的券核销时间
|
||||||
|
BasicAmount string `json:"basicAmount"` // 非必填 商品的计佣金额,每个商品对应的支付分摊金额,单位元
|
||||||
|
CouponFee string `json:"couponFee"` // 非必填 商品的佣金,当推广状态为失效、取消、风控时,佣金值为0,单位元
|
||||||
|
OrderViewId string `json:"orderViewId"` // 非必填 只对到家外卖商品券有效。商品券的核销完成履约的实物菜品订单号
|
||||||
|
RefundAmount string `json:"refundAmount"` // 非必填 到店到餐、到综、酒店子订单、到家闪购商品、到家医药业务类型的退款金额,到家其他业务类型不返回数据,单位元
|
||||||
|
RefundFee string `json:"refundFee"` // 非必填 到店到餐、到综、酒店子订单、到家闪购商品、到家医药业务类型的退款佣金,到家其他业务类型不返回数据,单位元
|
||||||
|
RefundTime string `json:"refundTime"` // 非必填 到店到餐、到综、酒店子订单、到家闪购商品、到家医药业务类型的退款时间,到家其他业务类型不返回数据
|
||||||
|
SettleTime string `json:"settleTime"` // 非必填 到家商品券/到家闪购商品/到店到餐/到综/酒店子订单的结算时间,完成并且进入结算账期时则变为结算状态。若存在多次结算记录则取最新结算时间
|
||||||
|
UpdateTime string `json:"updateTime"` // 非必填 到家商品券/到家闪购商品/到家医药/到店到餐、到综、酒店子订单的更新时间
|
||||||
|
}
|
||||||
@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"github.com/zywaited/xcopy"
|
"github.com/zywaited/xcopy"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MeituanUnionApi 美团联盟平台的api
|
// MeituanUnionApi 美团联盟平台的api
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package meituan_union
|
|||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
// AuthConfig api鉴权参数
|
||||||
|
|||||||
@ -1,92 +0,0 @@
|
|||||||
package meituan_media
|
|
||||||
|
|
||||||
// GenerateLinkRequest 生成推广链接请求
|
|
||||||
type GenerateLinkRequest struct {
|
|
||||||
LinkType int32 `json:"linkType"` // 必填 链接类型,枚举值:1 H5长链接;2 H5短链接;3 deeplink(唤起)链接;4 微信小程序唤起路径
|
|
||||||
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
|
|
||||||
ActId string `json:"actId,omitempty"` // 非必填 活动物料ID,我要推广-活动推广中第一列的id信息(和商品id、活动链接三选一填写,不能全填)
|
|
||||||
SkuViewId string `json:"skuViewId,omitempty"` // 非必填 商品id,对商品查询接口返回的skuViewid(和活动物料ID、活动链接三选一,不能全填)
|
|
||||||
Sid string `json:"sid,omitempty"` // 非必填 二级媒体身份标识,用于渠道效果追踪,限制64个字符,仅支持英文、数字和下划线
|
|
||||||
Text string `json:"text,omitempty"` // 非必填 只支持到家外卖商品券、买菜业务类型链接和活动物料链接。活动链接,即想要推广的目标链接,出参会返回成自己可推的链接,限定为当前可推广的活动链接或者商品券链接,请求内容尽量保持在200字以内,文本中仅存在一个http协议头的链接
|
|
||||||
}
|
|
||||||
|
|
||||||
// GenerateLinkResponse 生成推广链接响应
|
|
||||||
type GenerateLinkResponse struct {
|
|
||||||
Code int32 `json:"code"` // 响应码,0成功,其他失败
|
|
||||||
Message string `json:"message"` // 响应文案
|
|
||||||
Data string `json:"data"` // 返回对应的推广链接,这里的链接才能实现跟单计佣
|
|
||||||
SkuViewId string `json:"skuViewId"` // 若用text进行入参取链,且返回的推广链接为商品券链接,则返回对应商品的展示ID,可以根据该ID查商品券接口获取对应的展示信息和佣金信息
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryOrderListRequest 查询订单列表请求
|
|
||||||
type QueryOrderListRequest struct {
|
|
||||||
Platform int32 `json:"platform"` // 非必填 商品所属业务一级分类类型:1 到家及其他业务类型,2 到店业务类型(包含到店美食、休闲生活、酒店、门票);不填则默认1
|
|
||||||
BusinessLine []int32 `json:"businessLine"` // 非必填 业务线标识;1)当platform为1,选择到家及其他业务类型时,业务线枚举为1:外卖订单 WAIMAI 2:闪购红包 3:酒旅 4:美团电商订单(团好货) 5:医药 6:拼好饭 7:商品超值券包 COUPON 8:买菜 MAICAI 11:闪购商品;不传则默认传空表示非售卖券包订单类型的全部查询。若输入参数含7 商品超值券包,则只返回商品超值券包订单;2)当platform为2,选择到店业务类型 时,业务线枚举1:到餐 2:到综 3:酒店 4:门票,不填则默认传1
|
|
||||||
ActId int64 `json:"actId"` // 非必填 活动物料id,我要推广-活动推广中第一列的id信息,不传则返回所有actId的数据,建议查询订单时传入actId
|
|
||||||
Sid string `json:"sid"` // 非必填 二级推广位id,最长64位,不传则返回所有sid的数据
|
|
||||||
OrderId string `json:"orderId"` // 非必填 订单id,入参后可与业务线标识businessLine配合使用,输入的orderId需要与businessLine能对应上。举例:如查询商品超值券包订单时orderId传券包订单号,businessLine传7;除此以外其他查询筛选条件不生效,不传业务线标识businessLine则默认仅查非券包订单
|
|
||||||
StartTime int32 `json:"startTime"` // 非必填 查询时间类型对应的查询开始时间,10位时间戳表示,单位秒
|
|
||||||
EndTime int32 `json:"endTime"` // 非必填 查询时间类型对应的查询结束时间,10位时间戳表示,单位秒
|
|
||||||
Page int32 `json:"page"` // 非必填 页码,默认1,从1开始,若searchType选择2,本字段必须传1,若不传参数默认1
|
|
||||||
Limit int32 `json:"limit"` // 非必填 每页限制条数,默认100,最大支持100
|
|
||||||
QueryTimeType int32 `json:"queryTimeType"` // 非必填 查询时间类型,枚举值, 1 按订单支付时间查询, 2 按照更新时间查询, 默认为1
|
|
||||||
TradeType int32 `json:"tradeType"` // 非必填 交易类型,1表示CPS,2表示CPA
|
|
||||||
ScrollId string `json:"scrollId"` // 非必填 分页id,当searchType选择2逐页查询时,本字段为必填。若不填写,默认查询首页。取值为上一页查询时出参的scrollId字段
|
|
||||||
SearchType int32 `json:"searchType"` // 非必填 订单分页查询方案选择,不填则默认为1。1 分页查询(最多能查询到1万条订单),当选择本查询方案,page参数不能为空。此查询方式后续不再维护,建议使用2逐页查询。2 逐页查询(不限制查询订单数,只能逐页查询,不能指定页数),当选择本查询方案,需配合scrollId参数使用
|
|
||||||
CityNames []string `json:"cityNames"` // 非必填 可输入城市名称圈定特定城市的订单,单次最多查询10个城市(英文逗号分隔)。不传则默认全部城市订单。 注:如需确认城市具体名称,可参考后台订单明细页的城市筛选项,或参考具体活动的城市命名。目前只支持到家业务类型-商品超值券包业务线。
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryOrderListResponse 查询订单列表响应
|
|
||||||
type QueryOrderListResponse struct {
|
|
||||||
Code int `json:"code"` // 响应码,0成功,其他值为失败
|
|
||||||
Message string `json:"message"` // 响应文案
|
|
||||||
Data *QueryOrderData `json:"data"` // 响应结果信息
|
|
||||||
}
|
|
||||||
|
|
||||||
type QueryOrderData struct {
|
|
||||||
ActId int64 `json:"actId"` // 活动物料id,我要推广-活动推广中第一列的id信息
|
|
||||||
SkuCount int32 `json:"skuCount"` // 查询返回本页的数量合计(无实际使用场景,若查询订单购买商品数可以看返回的dataList中skuCount)
|
|
||||||
ScrollId string `json:"scrollId"` // 分页id,当searchType选择2逐页查询时,出参会返回本字段。用于下一页查询的scrollId字段入参使用
|
|
||||||
DataList []*OrderItem `json:"dataList"` // 数据列表
|
|
||||||
}
|
|
||||||
|
|
||||||
type OrderItem struct {
|
|
||||||
BusinessLine int32 `json:"businessLine"` // 业务线,同入参枚举说明
|
|
||||||
OrderId string `json:"orderId"` // 订单ID
|
|
||||||
PayTime int64 `json:"payTime"` // 订单支付时间
|
|
||||||
PayPrice string `json:"payPrice"` // 订单支付价格。针对到餐、到综、酒店、闪购、医药业务类型,为父订单的支付价格,单位元
|
|
||||||
UpdateTime int64 `json:"updateTime"` // 订单最近一次的更新时间。到家外卖商品券、到家医药、到家闪购商品业务、到店到餐、到综、酒店类型,订单时间为用户买券包的更新时间,非每张券的更新时间。针对以上业务类型,建议查询单张券的更新时间
|
|
||||||
CommissionRate string `json:"commissionRate"` // 订单预估佣金比例,300表示3%
|
|
||||||
Profit string `json:"profit"` // 订单整体的预估佣金收入,单位元,1.60表示1.6元
|
|
||||||
CpaProfit string `json:"cpaProfit"` // cpa类型的预估佣金收入,单位元,6.50表示6.5元
|
|
||||||
Sid string `json:"sid"` // 二级媒体身份标识,用于渠道效果追踪
|
|
||||||
ProductId string `json:"productId"` // 产品ID,对应商品查询接口的skuViewId,目前只支持到家外卖商品券、到家医药、到家闪购商品业务、到店业务类型
|
|
||||||
ProductName string `json:"productName"` // 产品名称,外卖订单展示店铺名称,到店取单个商品券的名称、其他展示全部商品名称
|
|
||||||
OrderDetail *OrderDetail `json:"orderDetail"` // 订单详情,只支持到家外卖商品券、到家医药、到家闪购商品业务、到店到餐、到综、酒店类型返回数据
|
|
||||||
RefundPrice string `json:"refundPrice"` // 只对非到店到餐、非到综、非酒店业务类型有效。订单维度退款价格,该笔订单用户发生退款行为时的退款计佣金额之和,超值券包订单本期不返回退款数据,单位元
|
|
||||||
RefundTime string `json:"refundTime"` // 只对非到店到餐、非到综、非酒店业务类型有效。订单维度最新一次发生退款的时间;超值券包订单本期不返回退款数据,单位元
|
|
||||||
RefundProfit string `json:"refundProfit"` // 只对非到店到餐、非到综、非酒店业务类型有效。订单维度退款预估佣金,该笔订单用户发生退款行为时的退款预估佣金金额之和;超值券包订单本期不返回退款数据,单位元
|
|
||||||
CpaRefundProfit string `json:"cpaRefundProfit"` // cpa退款预估佣金,单位元
|
|
||||||
Status string `json:"status"` // 表示订单维度状态,枚举有 2:付款(如果是CPA订单则表示奖励已创建) 3:完成 4:取消 5:风控 6:结算
|
|
||||||
TradeType int32 `json:"tradeType"` // 交易类型,1:cps,2:cpa
|
|
||||||
ActId int64 `json:"actId"` // 活动物料id,我要推广-活动推广中第一列的id信息
|
|
||||||
Appkey string `json:"appkey"` // 归因到的appKey,对应取链时入参的appkey
|
|
||||||
SkuCount int32 `json:"skuCount"` // 表示sku数量,团好货和券包类型的CPS订单返回有值,其余类型订单不返回该值
|
|
||||||
CityName string `json:"cityName"` // 订单所属的城市,目前支持二级城市粒度。目前只支持到家业务类型-商品超值券包业务线。
|
|
||||||
}
|
|
||||||
|
|
||||||
// 订单详情
|
|
||||||
type OrderDetail struct {
|
|
||||||
CouponStatus string `json:"couponStatus"` // 非必填 本期只有到到家外卖商品券、到家医药、到家闪购商品业务、到店到餐、到综、酒店业务类型展示订单明细,表示商品券/子订单推广计佣状态,1、付款,2、完成(或券已核销),3、结算,4、失效(含取消或风控的情况)
|
|
||||||
ItemOrderId string `json:"itemOrderId"` // 非必填 针对到店到餐、到综、酒店商品券,返回商品券的子订单号。其他业务类型不返回
|
|
||||||
FinishTime string `json:"finishTime"` // 非必填 1、针对到家外卖商品券,返回商品券核销完成履约的实物菜品订单号对应的完成时间;2、针对到家医药&闪购商品,返回商品订单完成时间;3、针对到店到餐、到综、酒店子订单,返回子订单对应的券核销时间
|
|
||||||
BasicAmount string `json:"basicAmount"` // 非必填 商品的计佣金额,每个商品对应的支付分摊金额,单位元
|
|
||||||
CouponFee string `json:"couponFee"` // 非必填 商品的佣金,当推广状态为失效、取消、风控时,佣金值为0,单位元
|
|
||||||
OrderViewId string `json:"orderViewId"` // 非必填 只对到家外卖商品券有效。商品券的核销完成履约的实物菜品订单号
|
|
||||||
RefundAmount string `json:"refundAmount"` // 非必填 到店到餐、到综、酒店子订单、到家闪购商品、到家医药业务类型的退款金额,到家其他业务类型不返回数据,单位元
|
|
||||||
RefundFee string `json:"refundFee"` // 非必填 到店到餐、到综、酒店子订单、到家闪购商品、到家医药业务类型的退款佣金,到家其他业务类型不返回数据,单位元
|
|
||||||
RefundTime string `json:"refundTime"` // 非必填 到店到餐、到综、酒店子订单、到家闪购商品、到家医药业务类型的退款时间,到家其他业务类型不返回数据
|
|
||||||
SettleTime string `json:"settleTime"` // 非必填 到家商品券/到家闪购商品/到店到餐/到综/酒店子订单的结算时间,完成并且进入结算账期时则变为结算状态。若存在多次结算记录则取最新结算时间
|
|
||||||
UpdateTime string `json:"updateTime"` // 非必填 到家商品券/到家闪购商品/到家医药/到店到餐、到综、酒店子订单的更新时间
|
|
||||||
}
|
|
||||||
@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// T3UnionApi 调用第三方平台的api
|
// T3UnionApi 调用第三方平台的api
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package t3_union
|
|||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
// AuthConfig api鉴权参数
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Sign struct {
|
type Sign struct {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
引入mod
|
引入mod
|
||||||
```
|
```
|
||||||
go get gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk@master
|
go get repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk@master
|
||||||
```
|
```
|
||||||
使用方法
|
使用方法
|
||||||
```
|
```
|
||||||
|
|||||||
@ -6,9 +6,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/const"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/const"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type client struct {
|
type client struct {
|
||||||
|
|||||||
@ -11,7 +11,7 @@ type ResponseOrderItem struct {
|
|||||||
// `393`: 滴滴货运<br>
|
// `393`: 滴滴货运<br>
|
||||||
// `500`: 花小猪<br>
|
// `500`: 花小猪<br>
|
||||||
// `120`: 滴滴代驾
|
// `120`: 滴滴代驾
|
||||||
ProductId string `json:"product_id"`
|
ProductId int64 `json:"product_id"`
|
||||||
// 支付时间
|
// 支付时间
|
||||||
PayTime int64 `json:"pay_time"`
|
PayTime int64 `json:"pay_time"`
|
||||||
// 支付金额,单位:分
|
// 支付金额,单位:分
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import (
|
|||||||
netUrl "net/url"
|
netUrl "net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
consts "gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/const"
|
consts "repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/const"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@ -4,11 +4,11 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/ability132/request"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/request"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/ability132/response"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/response"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Ability132 struct {
|
type Ability132 struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcMessagesConsumeTmcMessage struct {
|
type TaobaoTmcMessagesConsumeTmcMessage struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcGroupAddRequest struct {
|
type TaobaoTmcGroupAddRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcGroupDeleteRequest struct {
|
type TaobaoTmcGroupDeleteRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcGroupsGetRequest struct {
|
type TaobaoTmcGroupsGetRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcMessagesConfirmRequest struct {
|
type TaobaoTmcMessagesConfirmRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcMessagesProduceRequest struct {
|
type TaobaoTmcMessagesProduceRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcTopicGroupAddRequest struct {
|
type TaobaoTmcTopicGroupAddRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcTopicGroupDeleteRequest struct {
|
type TaobaoTmcTopicGroupDeleteRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcGroupAddResponse struct {
|
type TaobaoTmcGroupAddResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcGroupsGetResponse struct {
|
type TaobaoTmcGroupsGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcMessagesConsumeResponse struct {
|
type TaobaoTmcMessagesConsumeResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcMessagesProduceResponse struct {
|
type TaobaoTmcMessagesProduceResponse struct {
|
||||||
|
|||||||
@ -4,11 +4,11 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/response"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/response"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Defaultability struct {
|
type Defaultability struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcUserGetTmcUser struct {
|
type TaobaoTmcUserGetTmcUser struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeMediaActivityCouponSendRequest struct {
|
type AlibabaAlscUnionElemeMediaActivityCouponSendRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionItempromotionGetRequest struct {
|
type AlibabaAlscUnionElemePromotionItempromotionGetRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionItempromotionQueryRequest struct {
|
type AlibabaAlscUnionElemePromotionItempromotionQueryRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionItempromotionStoreQueryRequest struct {
|
type AlibabaAlscUnionElemePromotionItempromotionStoreQueryRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetRequest struct {
|
type AlibabaAlscUnionElemePromotionOfficialactivityGetRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionStorepromotionGetRequest struct {
|
type AlibabaAlscUnionElemePromotionStorepromotionGetRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionStorepromotionQueryRequest struct {
|
type AlibabaAlscUnionElemePromotionStorepromotionQueryRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeToolOrderAttrbuteCheckRequest struct {
|
type AlibabaAlscUnionElemeToolOrderAttrbuteCheckRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemDetailGetRequest struct {
|
type AlibabaAlscUnionKbItemDetailGetRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemStoreDetailGetRequest struct {
|
type AlibabaAlscUnionKbItemStoreDetailGetRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemStoreRelationQueryRequest struct {
|
type AlibabaAlscUnionKbItemStoreRelationQueryRequest struct {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionPromotionLinkAnalyzeRequest struct {
|
type AlibabaAlscUnionPromotionLinkAnalyzeRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcUserGetRequest struct {
|
type TaobaoTmcUserGetRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcUserPermitRequest struct {
|
type TaobaoTmcUserPermitRequest struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionItempromotionGetResponse struct {
|
type AlibabaAlscUnionElemePromotionItempromotionGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionItempromotionQueryResponse struct {
|
type AlibabaAlscUnionElemePromotionItempromotionQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionItempromotionStoreQueryResponse struct {
|
type AlibabaAlscUnionElemePromotionItempromotionStoreQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetResponse struct {
|
type AlibabaAlscUnionElemePromotionOfficialactivityGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionStorepromotionGetResponse struct {
|
type AlibabaAlscUnionElemePromotionStorepromotionGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemePromotionStorepromotionQueryResponse struct {
|
type AlibabaAlscUnionElemePromotionStorepromotionQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeStorepromotionReviewbwcDetailGetResponse struct {
|
type AlibabaAlscUnionElemeStorepromotionReviewbwcDetailGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeStorepromotionReviewbwcQueryResponse struct {
|
type AlibabaAlscUnionElemeStorepromotionReviewbwcQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeStorepromotionReviewbwcStockLockResponse struct {
|
type AlibabaAlscUnionElemeStorepromotionReviewbwcStockLockResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeStorepromotionReviewbwcStockReleaseResponse struct {
|
type AlibabaAlscUnionElemeStorepromotionReviewbwcStockReleaseResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionElemeToolOrderAttrbuteCheckResponse struct {
|
type AlibabaAlscUnionElemeToolOrderAttrbuteCheckResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemDetailGetResponse struct {
|
type AlibabaAlscUnionKbItemDetailGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemPromotionFilterListResponse struct {
|
type AlibabaAlscUnionKbItemPromotionFilterListResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemPromotionResponse struct {
|
type AlibabaAlscUnionKbItemPromotionResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemPromotionShareCreateResponse struct {
|
type AlibabaAlscUnionKbItemPromotionShareCreateResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemQueryResponse struct {
|
type AlibabaAlscUnionKbItemQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemStoreDetailGetResponse struct {
|
type AlibabaAlscUnionKbItemStoreDetailGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbItemStoreRelationQueryResponse struct {
|
type AlibabaAlscUnionKbItemStoreRelationQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbStoreItemQueryResponse struct {
|
type AlibabaAlscUnionKbStoreItemQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbStoreQueryResponse struct {
|
type AlibabaAlscUnionKbStoreQueryResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbcpaOrderDetailsGetResponse struct {
|
type AlibabaAlscUnionKbcpaOrderDetailsGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbcpaPunishOrderGetResponse struct {
|
type AlibabaAlscUnionKbcpaPunishOrderGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbcpaRefundOrderGetResponse struct {
|
type AlibabaAlscUnionKbcpaRefundOrderGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbcpxPositiveOrderGetResponse struct {
|
type AlibabaAlscUnionKbcpxPositiveOrderGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbcpxPunishOrderGetResponse struct {
|
type AlibabaAlscUnionKbcpxPunishOrderGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionKbcpxRefundOrderGetResponse struct {
|
type AlibabaAlscUnionKbcpxRefundOrderGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionMediaZoneAddResponse struct {
|
type AlibabaAlscUnionMediaZoneAddResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionMediaZoneGetResponse struct {
|
type AlibabaAlscUnionMediaZoneGetResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlibabaAlscUnionPromotionLinkAnalyzeResponse struct {
|
type AlibabaAlscUnionPromotionLinkAnalyzeResponse struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaobaoTmcUserGetResponse struct {
|
type TaobaoTmcUserGetResponse struct {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/sdk/topsdk/util"
|
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TopClient struct {
|
type TopClient struct {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user