Compare commits
No commits in common. "68c12aa709962697fb3b543b4ef518b0a5a63da0" and "bf2bc639ebd21208c5c98e7d2f3ee9face97a8ba" have entirely different histories.
68c12aa709
...
bf2bc639eb
22
go.mod
22
go.mod
@ -12,42 +12,22 @@ 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 // indirect
|
require google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
|
|
||||||
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
|
||||||
github.com/go-logr/logr v1.2.3 // indirect
|
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
|
||||||
github.com/golang/protobuf v1.5.3 // indirect
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
|
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||||
github.com/openzipkin/zipkin-go v0.4.1 // indirect
|
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||||
go.opentelemetry.io/otel v1.14.0 // indirect
|
go.opentelemetry.io/otel v1.14.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/zipkin v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
||||||
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
|
|
||||||
go.uber.org/atomic v1.10.0 // indirect
|
go.uber.org/atomic v1.10.0 // indirect
|
||||||
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/net v0.14.0 // indirect
|
|
||||||
golang.org/x/sys v0.11.0 // indirect
|
golang.org/x/sys v0.11.0 // indirect
|
||||||
golang.org/x/text v0.12.0 // indirect
|
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
|
|
||||||
google.golang.org/grpc v1.57.0 // indirect
|
|
||||||
google.golang.org/protobuf v1.31.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
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
package fliggy
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/request"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FliggyApi 飞猪平台
|
|
||||||
// Api defines the interface of fliggy api
|
|
||||||
type FliggyApi interface {
|
|
||||||
// FliggyPromoteOrdersList 飞猪分销订单列表
|
|
||||||
FliggyPromoteOrdersList(req *request.AlibabaFliggyPromoteOrdersListRequest) ([]*domain.AlibabaFliggyPromoteOrdersListOrder, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type fliggyApiImpl struct {
|
|
||||||
log logx.Logger
|
|
||||||
client *Client
|
|
||||||
}
|
|
||||||
|
|
||||||
func newFliggyApiImpl(log logx.Logger, client *Client) FliggyApi {
|
|
||||||
return &fliggyApiImpl{
|
|
||||||
log: log,
|
|
||||||
client: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FliggyPromoteOrdersList 飞猪分销订单列表
|
|
||||||
func (a *fliggyApiImpl) FliggyPromoteOrdersList(req *request.AlibabaFliggyPromoteOrdersListRequest) ([]*domain.AlibabaFliggyPromoteOrdersListOrder, error) {
|
|
||||||
resp, err := a.client.abilityClient.AlibabaFliggyPromoteOrdersList(req)
|
|
||||||
if err != nil {
|
|
||||||
a.log.WithFields(logx.LogField{Key: "data", Value: map[string]any{"req": req, "resp": resp}}).Errorf("[fliggyApiImpl][FliggyPromoteOrdersList] get promote orders failed, error: %v", err)
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if resp == nil {
|
|
||||||
return nil, fmt.Errorf("[fliggyApiImpl][FliggyPromoteOrdersList] get promote order list is empty")
|
|
||||||
}
|
|
||||||
var result []*domain.AlibabaFliggyPromoteOrdersListOrder
|
|
||||||
if resp.Model.List != nil {
|
|
||||||
for _, item := range *resp.Model.List {
|
|
||||||
entity := item
|
|
||||||
result = append(result, &entity)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
}
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
package fliggy
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"github.com/stretchr/testify/suite"
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/request"
|
|
||||||
)
|
|
||||||
|
|
||||||
// api-单元测试
|
|
||||||
type apiClientSuite struct {
|
|
||||||
suite.Suite
|
|
||||||
api FliggyApi
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestApiClient(t *testing.T) {
|
|
||||||
suite.Run(t, new(apiClientSuite))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *apiClientSuite) SetupSuite() {
|
|
||||||
log := logx.WithContext(context.Background())
|
|
||||||
apiClient := NewApiClient(log, AuthConfig{
|
|
||||||
AppKey: "34755002",
|
|
||||||
AppSecret: "0d4da23206d78ec991c3a96e789dec40",
|
|
||||||
})
|
|
||||||
a.api = apiClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *apiClientSuite) Test_FliggyPromoteOrdersList() {
|
|
||||||
page := int64(1)
|
|
||||||
start, _ := time.ParseInLocation(time.DateTime, "2024-08-04 00:00:00", time.Local)
|
|
||||||
end, _ := time.ParseInLocation(time.DateTime, "2024-08-04 23:59:59", time.Local)
|
|
||||||
sTime := util.LocalTime(start)
|
|
||||||
eTime := util.LocalTime(end)
|
|
||||||
|
|
||||||
req := &request.AlibabaFliggyPromoteOrdersListRequest{
|
|
||||||
PageNo: &page,
|
|
||||||
BeforeModifyTime: &sTime,
|
|
||||||
AfterModifyTime: &eTime,
|
|
||||||
}
|
|
||||||
resp, err := a.api.FliggyPromoteOrdersList(req)
|
|
||||||
if err != nil {
|
|
||||||
a.T().Errorf("=====[Test_FliggyPromoteOrdersList] err: %v", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
a.T().Logf("=====[Test_FliggyPromoteOrdersList] resp: %+v", resp)
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package fliggy
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AuthConfig api鉴权参数
|
|
||||||
type AuthConfig struct {
|
|
||||||
AppKey string // 应用key
|
|
||||||
AppSecret string // 应用秘钥
|
|
||||||
}
|
|
||||||
|
|
||||||
// 连接第三方平台的client
|
|
||||||
type Client struct {
|
|
||||||
topClient *fliggysdk.TopClient
|
|
||||||
abilityClient *defaultability.Defaultability
|
|
||||||
log logx.Logger
|
|
||||||
authConfig AuthConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewApiClient(log logx.Logger, conf AuthConfig) FliggyApi {
|
|
||||||
clt := newClient(log, conf)
|
|
||||||
return newFliggyApiImpl(log, clt)
|
|
||||||
}
|
|
||||||
|
|
||||||
func newClient(log logx.Logger, conf AuthConfig) *Client {
|
|
||||||
tc := fliggysdk.NewDefaultTopClient(conf.AppKey, conf.AppSecret, "https://eco.taobao.com/router/rest", 20000, 20000)
|
|
||||||
return &Client{
|
|
||||||
topClient: &tc,
|
|
||||||
abilityClient: defaultability.NewDefaultability(&tc),
|
|
||||||
log: log,
|
|
||||||
authConfig: conf,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
package fliggy
|
|
||||||
|
|
||||||
// 相关地址
|
|
||||||
const (
|
|
||||||
SiteDomain = "https://sht-front.fliggy.com/" // SiteDomain 域名
|
|
||||||
SiteUrl = "https://sht-front.fliggy.com/" // SiteUrl 后台地址
|
|
||||||
ApiDocUrl = "https://open.taobao.com/api.htm?docId=63469&docType=2&scopeId=27205" // ApiDocUrl api文档地址
|
|
||||||
)
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
package fliggy
|
|
||||||
|
|
||||||
type PublicParam struct {
|
|
||||||
Method string // 必传 API接口名称,具体参见各平台API接口文档,例:taobao.item.seller.get
|
|
||||||
AppKey string // 必传 TOP分配给应用的AppKey。例:12345678
|
|
||||||
Session string // 可选 用户授权成功后,平台颁发给应用的授权session,详细介绍请点击这里。当此API文档的标签上注明:“需要授权”,则此参数必传;“不需要授权”,则此参数不需要传。
|
|
||||||
Timestamp string // 必传 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8,例如:2016-01-01 12:00:00。淘宝API服务端允许客户端请求最大时间误差为10分钟。
|
|
||||||
V string // 必传 API协议版本,可选值:2.0
|
|
||||||
SignMethod string // 必传 签名的摘要算法,可选值为:hmac,md5,hmac-sha256。
|
|
||||||
Format string // 否 返回内容响应格式。不传默认为xml格式,可选值:xml,json。
|
|
||||||
Simplify bool // 否 是否采用精简JSON返回格式,仅当format=json时有效,可选值:false,true,不传为false。
|
|
||||||
}
|
|
||||||
@ -1,198 +0,0 @@
|
|||||||
package ability132
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"log"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability132/request"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability132/response"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Ability132 struct {
|
|
||||||
Client *fliggysdk.TopClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewAbility132(client *fliggysdk.TopClient) *Ability132 {
|
|
||||||
return &Ability132{client}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
删除消息topic分组路由
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcTopicGroupDelete(req *request.TaobaoTmcTopicGroupDeleteRequest) (*response.TaobaoTmcTopicGroupDeleteResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.topic.group.delete", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcTopicGroupDeleteResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcTopicGroupDelete error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
点对点消息topic分组路由
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcTopicGroupAdd(req *request.TaobaoTmcTopicGroupAddRequest) (*response.TaobaoTmcTopicGroupAddResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.topic.group.add", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcTopicGroupAddResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcTopicGroupAdd error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
批量发送消息
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcMessagesProduce(req *request.TaobaoTmcMessagesProduceRequest) (*response.TaobaoTmcMessagesProduceResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.messages.produce", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcMessagesProduceResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcMessagesProduce error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取自定义用户分组列表
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcGroupsGet(req *request.TaobaoTmcGroupsGetRequest) (*response.TaobaoTmcGroupsGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.groups.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcGroupsGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcGroupsGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
删除指定的分组或分组下的用户
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcGroupDelete(req *request.TaobaoTmcGroupDeleteRequest) (*response.TaobaoTmcGroupDeleteResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.group.delete", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcGroupDeleteResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcGroupDelete error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
为已开通用户添加用户分组
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcGroupAdd(req *request.TaobaoTmcGroupAddRequest) (*response.TaobaoTmcGroupAddResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.group.add", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcGroupAddResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcGroupAdd error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
确认消费消息的状态
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcMessagesConfirm(req *request.TaobaoTmcMessagesConfirmRequest) (*response.TaobaoTmcMessagesConfirmResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.messages.confirm", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcMessagesConfirmResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcMessagesConfirm error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
消费多条消息
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcMessagesConsume(req *request.TaobaoTmcMessagesConsumeRequest) (*response.TaobaoTmcMessagesConsumeResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.messages.consume", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcMessagesConsumeResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcMessagesConsume error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
TMC授权token
|
|
||||||
*/
|
|
||||||
func (ability *Ability132) TaobaoTmcAuthGet(req *request.TaobaoTmcAuthGetRequest) (*response.TaobaoTmcAuthGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability132 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.auth.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcAuthGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcAuthGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type TaobaoTmcGroupsGetTmcGroup struct {
|
|
||||||
/*
|
|
||||||
分组名称 */
|
|
||||||
Name *string `json:"name,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcGroupsGetTmcGroup) SetName(v string) *TaobaoTmcGroupsGetTmcGroup {
|
|
||||||
s.Name = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesConsumeTmcMessage struct {
|
|
||||||
/*
|
|
||||||
消息所属的用户编号 */
|
|
||||||
UserId *int64 `json:"user_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户的昵称 */
|
|
||||||
UserNick *string `json:"user_nick,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息详细内容,格式为JSON/XML */
|
|
||||||
Content *string `json:"content,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息ID */
|
|
||||||
Id *int64 `json:"id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息发布时间 */
|
|
||||||
PubTime *util.LocalTime `json:"pub_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息发布者的AppKey */
|
|
||||||
PubAppKey *string `json:"pub_app_key,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息所属主题 */
|
|
||||||
Topic *string `json:"topic,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetUserId(v int64) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.UserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetUserNick(v string) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.UserNick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetContent(v string) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.Content = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetId(v int64) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.Id = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetPubTime(v util.LocalTime) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.PubTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetPubAppKey(v string) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.PubAppKey = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeTmcMessage) SetTopic(v string) *TaobaoTmcMessagesConsumeTmcMessage {
|
|
||||||
s.Topic = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesProduceTmcProduceResult struct {
|
|
||||||
/*
|
|
||||||
错误码 */
|
|
||||||
ErrorCode *string `json:"error_code,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
错误信息 */
|
|
||||||
ErrorMessage *string `json:"error_message,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功 */
|
|
||||||
IsSuccess *bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcProduceResult) SetErrorCode(v string) *TaobaoTmcMessagesProduceTmcProduceResult {
|
|
||||||
s.ErrorCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcProduceResult) SetErrorMessage(v string) *TaobaoTmcMessagesProduceTmcProduceResult {
|
|
||||||
s.ErrorMessage = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcProduceResult) SetIsSuccess(v bool) *TaobaoTmcMessagesProduceTmcProduceResult {
|
|
||||||
s.IsSuccess = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesProduceTmcPublishMessage struct {
|
|
||||||
/*
|
|
||||||
消息内容的JSON表述,必须按照topic的定义来填充 */
|
|
||||||
Content *string `json:"content,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息的扩增属性,用json格式表示 */
|
|
||||||
JsonExContent *string `json:"json_ex_content,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
直发消息需要传入目标appkey */
|
|
||||||
TargetAppKey *string `json:"target_app_key,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
目标分组 */
|
|
||||||
TargetGroup *string `json:"target_group,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息类型 */
|
|
||||||
Topic *string `json:"topic,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcPublishMessage) SetContent(v string) *TaobaoTmcMessagesProduceTmcPublishMessage {
|
|
||||||
s.Content = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcPublishMessage) SetJsonExContent(v string) *TaobaoTmcMessagesProduceTmcPublishMessage {
|
|
||||||
s.JsonExContent = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcPublishMessage) SetTargetAppKey(v string) *TaobaoTmcMessagesProduceTmcPublishMessage {
|
|
||||||
s.TargetAppKey = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcPublishMessage) SetTargetGroup(v string) *TaobaoTmcMessagesProduceTmcPublishMessage {
|
|
||||||
s.TargetGroup = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesProduceTmcPublishMessage) SetTopic(v string) *TaobaoTmcMessagesProduceTmcPublishMessage {
|
|
||||||
s.Topic = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTmcAuthGetRequest struct {
|
|
||||||
/*
|
|
||||||
tmc组名 */
|
|
||||||
Group *string `json:"group,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcAuthGetRequest) SetGroup(v string) *TaobaoTmcAuthGetRequest {
|
|
||||||
s.Group = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcAuthGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Group != nil {
|
|
||||||
paramMap["group"] = *req.Group
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcAuthGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcGroupAddRequest struct {
|
|
||||||
/*
|
|
||||||
分组名称,同一个应用下需要保证唯一性,最长32个字符。添加分组后,消息通道会为用户的消息分配独立分组,但之前的消息还是存储于默认分组中。不能以default开头,default开头为系统默认组。 */
|
|
||||||
GroupName *string `json:"group_name" required:"true" `
|
|
||||||
/*
|
|
||||||
用户昵称列表,以半角逗号分隔,支持子账号,支持增量添加用户 */
|
|
||||||
Nicks *[]string `json:"nicks" required:"true" `
|
|
||||||
/*
|
|
||||||
用户所属于的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户 defalutValue<EFBFBD><EFBFBD>tbUIC */
|
|
||||||
UserPlatform *string `json:"user_platform,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcGroupAddRequest) SetGroupName(v string) *TaobaoTmcGroupAddRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcGroupAddRequest) SetNicks(v []string) *TaobaoTmcGroupAddRequest {
|
|
||||||
s.Nicks = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcGroupAddRequest) SetUserPlatform(v string) *TaobaoTmcGroupAddRequest {
|
|
||||||
s.UserPlatform = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcGroupAddRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
if req.Nicks != nil {
|
|
||||||
paramMap["nicks"] = util.ConvertBasicList(*req.Nicks)
|
|
||||||
}
|
|
||||||
if req.UserPlatform != nil {
|
|
||||||
paramMap["user_platform"] = *req.UserPlatform
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcGroupAddRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcGroupDeleteRequest struct {
|
|
||||||
/*
|
|
||||||
分组名称,分组删除后,用户的消息将会存储于默认分组中。警告:由于分组已经删除,用户之前未消费的消息将无法再获取。不能以default开头,default开头为系统默认组。 */
|
|
||||||
GroupName *string `json:"group_name" required:"true" `
|
|
||||||
/*
|
|
||||||
用户列表,不传表示删除整个分组,如果用户全部删除后,也会自动删除整个分组 */
|
|
||||||
Nicks *[]string `json:"nicks,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
用户所属于的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户 defalutValue<EFBFBD><EFBFBD>tbUIC */
|
|
||||||
UserPlatform *string `json:"user_platform,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcGroupDeleteRequest) SetGroupName(v string) *TaobaoTmcGroupDeleteRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcGroupDeleteRequest) SetNicks(v []string) *TaobaoTmcGroupDeleteRequest {
|
|
||||||
s.Nicks = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcGroupDeleteRequest) SetUserPlatform(v string) *TaobaoTmcGroupDeleteRequest {
|
|
||||||
s.UserPlatform = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcGroupDeleteRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
if req.Nicks != nil {
|
|
||||||
paramMap["nicks"] = util.ConvertBasicList(*req.Nicks)
|
|
||||||
}
|
|
||||||
if req.UserPlatform != nil {
|
|
||||||
paramMap["user_platform"] = *req.UserPlatform
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcGroupDeleteRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcGroupsGetRequest struct {
|
|
||||||
/*
|
|
||||||
要查询分组的名称,多个分组用半角逗号分隔,不传代表查询所有分组信息,但不会返回组下面的用户信息。如果应用没有设置分组则返回空。组名不能以default开头,default开头是系统默认的组。 */
|
|
||||||
GroupNames *[]string `json:"group_names,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
页码 defalutValue<EFBFBD><EFBFBD>1 */
|
|
||||||
PageNo *int64 `json:"page_no,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
每页返回多少个分组 defalutValue<EFBFBD><EFBFBD>40 */
|
|
||||||
PageSize *int64 `json:"page_size,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcGroupsGetRequest) SetGroupNames(v []string) *TaobaoTmcGroupsGetRequest {
|
|
||||||
s.GroupNames = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcGroupsGetRequest) SetPageNo(v int64) *TaobaoTmcGroupsGetRequest {
|
|
||||||
s.PageNo = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcGroupsGetRequest) SetPageSize(v int64) *TaobaoTmcGroupsGetRequest {
|
|
||||||
s.PageSize = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcGroupsGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupNames != nil {
|
|
||||||
paramMap["group_names"] = util.ConvertBasicList(*req.GroupNames)
|
|
||||||
}
|
|
||||||
if req.PageNo != nil {
|
|
||||||
paramMap["page_no"] = *req.PageNo
|
|
||||||
}
|
|
||||||
if req.PageSize != nil {
|
|
||||||
paramMap["page_size"] = *req.PageSize
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcGroupsGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesConfirmRequest struct {
|
|
||||||
/*
|
|
||||||
分组名称,不传代表默认分组 */
|
|
||||||
GroupName *string `json:"group_name,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
处理成功的消息ID列表 最大 200个ID */
|
|
||||||
SMessageIds *[]int64 `json:"s_message_ids" required:"true" `
|
|
||||||
/*
|
|
||||||
处理失败的消息ID列表--已废弃,无需传此字段 */
|
|
||||||
FMessageIds *[]int64 `json:"f_message_ids,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessagesConfirmRequest) SetGroupName(v string) *TaobaoTmcMessagesConfirmRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConfirmRequest) SetSMessageIds(v []int64) *TaobaoTmcMessagesConfirmRequest {
|
|
||||||
s.SMessageIds = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConfirmRequest) SetFMessageIds(v []int64) *TaobaoTmcMessagesConfirmRequest {
|
|
||||||
s.FMessageIds = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessagesConfirmRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
if req.SMessageIds != nil {
|
|
||||||
paramMap["s_message_ids"] = util.ConvertBasicList(*req.SMessageIds)
|
|
||||||
}
|
|
||||||
if req.FMessageIds != nil {
|
|
||||||
paramMap["f_message_ids"] = util.ConvertBasicList(*req.FMessageIds)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessagesConfirmRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesConsumeRequest struct {
|
|
||||||
/*
|
|
||||||
用户分组名称,不传表示消费默认分组,如果应用没有设置用户分组,传入分组名称将会返回错误 */
|
|
||||||
GroupName *string `json:"group_name,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
每次批量消费消息的条数,最小值:10;最大值:200 defalutValue<EFBFBD><EFBFBD>100 */
|
|
||||||
Quantity *int64 `json:"quantity,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessagesConsumeRequest) SetGroupName(v string) *TaobaoTmcMessagesConsumeRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessagesConsumeRequest) SetQuantity(v int64) *TaobaoTmcMessagesConsumeRequest {
|
|
||||||
s.Quantity = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessagesConsumeRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
if req.Quantity != nil {
|
|
||||||
paramMap["quantity"] = *req.Quantity
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessagesConsumeRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability132/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesProduceRequest struct {
|
|
||||||
/*
|
|
||||||
tmc消息列表, 最多50条,元素结构与taobao.tmc.message.produce一致,用json表示的消息列表。例如:[{"content": "{\"tid\":1234554321,\"status\":\"X_LOGISTICS_PRINTED\",\"action_time\":\"2014-08-08 18:24:00\",\"seller_nick\": \"向阳aa\",\"operator\":\"小张\"}","topic": "taobao_jds_TradeTrace"},{"content": "{\"tid\":1234554321,\"status\":\"X_LOGISTICS_PRINTED\",\"action_time\":\"2014-08-08 18:24:00\",\"seller_nick\": \"向阳aa\",\"operator\":\"小张\"}","topic": "taobao_jds_TradeTrace"}] */
|
|
||||||
Messages *[]domain.TaobaoTmcMessagesProduceTmcPublishMessage `json:"messages" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessagesProduceRequest) SetMessages(v []domain.TaobaoTmcMessagesProduceTmcPublishMessage) *TaobaoTmcMessagesProduceRequest {
|
|
||||||
s.Messages = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessagesProduceRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Messages != nil {
|
|
||||||
paramMap["messages"] = util.ConvertStructList(*req.Messages)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessagesProduceRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcTopicGroupAddRequest struct {
|
|
||||||
/*
|
|
||||||
消息分组名,如果不存在,会自动创建 */
|
|
||||||
GroupName *string `json:"group_name" required:"true" `
|
|
||||||
/*
|
|
||||||
消息topic名称,多个以逗号(,)分割 */
|
|
||||||
Topics *[]string `json:"topics" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcTopicGroupAddRequest) SetGroupName(v string) *TaobaoTmcTopicGroupAddRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcTopicGroupAddRequest) SetTopics(v []string) *TaobaoTmcTopicGroupAddRequest {
|
|
||||||
s.Topics = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcTopicGroupAddRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
if req.Topics != nil {
|
|
||||||
paramMap["topics"] = util.ConvertBasicList(*req.Topics)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcTopicGroupAddRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcTopicGroupDeleteRequest struct {
|
|
||||||
/*
|
|
||||||
消息分组名 */
|
|
||||||
GroupName *string `json:"group_name" required:"true" `
|
|
||||||
/*
|
|
||||||
消息分组Id,一般不用填写,如果分组已经被删除,则根据问题排查工具返回的ID删除路由关系 */
|
|
||||||
GroupId *int64 `json:"group_id,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
消息topic名称,多个以逗号(,)分割 */
|
|
||||||
Topics *[]string `json:"topics" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcTopicGroupDeleteRequest) SetGroupName(v string) *TaobaoTmcTopicGroupDeleteRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcTopicGroupDeleteRequest) SetGroupId(v int64) *TaobaoTmcTopicGroupDeleteRequest {
|
|
||||||
s.GroupId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcTopicGroupDeleteRequest) SetTopics(v []string) *TaobaoTmcTopicGroupDeleteRequest {
|
|
||||||
s.Topics = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcTopicGroupDeleteRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
if req.GroupId != nil {
|
|
||||||
paramMap["group_id"] = *req.GroupId
|
|
||||||
}
|
|
||||||
if req.Topics != nil {
|
|
||||||
paramMap["topics"] = util.ConvertBasicList(*req.Topics)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcTopicGroupDeleteRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTmcAuthGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
result
|
|
||||||
*/
|
|
||||||
Result string `json:"result,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcGroupAddResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
创建时间
|
|
||||||
*/
|
|
||||||
Created util.LocalTime `json:"created,omitempty" `
|
|
||||||
/*
|
|
||||||
分组名称
|
|
||||||
*/
|
|
||||||
GroupName string `json:"group_name,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTmcGroupDeleteResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability132/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcGroupsGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
dasdasd
|
|
||||||
*/
|
|
||||||
Groups []domain.TaobaoTmcGroupsGetTmcGroup `json:"groups,omitempty" `
|
|
||||||
/*
|
|
||||||
分组总数
|
|
||||||
*/
|
|
||||||
TotalResults int64 `json:"total_results,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesConfirmResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability132/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesConsumeResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息列表
|
|
||||||
*/
|
|
||||||
Messages []domain.TaobaoTmcMessagesConsumeTmcMessage `json:"messages,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability132/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcMessagesProduceResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否全部成功
|
|
||||||
*/
|
|
||||||
IsAllSuccess bool `json:"is_all_success,omitempty" `
|
|
||||||
/*
|
|
||||||
发送结果,与发送时的参数顺序一致。如果is_all_success为true时,不用校验result是否成功
|
|
||||||
*/
|
|
||||||
Results []domain.TaobaoTmcMessagesProduceTmcProduceResult `json:"results,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTmcTopicGroupAddResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
true
|
|
||||||
*/
|
|
||||||
Result bool `json:"result,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTmcTopicGroupDeleteResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
true
|
|
||||||
*/
|
|
||||||
Result bool `json:"result,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,218 +0,0 @@
|
|||||||
package ability304
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"log"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability304/request"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability304/response"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Ability304 struct {
|
|
||||||
Client *fliggysdk.TopClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewAbility304(client *fliggysdk.TopClient) *Ability304 {
|
|
||||||
return &Ability304{client}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取ISV发起请求服务器IP
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoAppipGet(req *request.TaobaoAppipGetRequest) (*response.TaobaoAppipGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.appip.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoAppipGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoAppipGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
业务文件获取
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoFilesGet(req *request.TaobaoFilesGetRequest) (*response.TaobaoFilesGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.files.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoFilesGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoFilesGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
刷新Access Token
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoTopAuthTokenRefresh(req *request.TaobaoTopAuthTokenRefreshRequest) (*response.TaobaoTopAuthTokenRefreshResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.top.auth.token.refresh", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTopAuthTokenRefreshResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTopAuthTokenRefresh error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取Access Token
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoTopAuthTokenCreate(req *request.TaobaoTopAuthTokenCreateRequest) (*response.TaobaoTopAuthTokenCreateResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.top.auth.token.create", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTopAuthTokenCreateResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTopAuthTokenCreate error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取授权账号对应的OpenUid
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoOpenuidGet(req *request.TaobaoOpenuidGetRequest, session string) (*response.TaobaoOpenuidGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.ExecuteWithSession("taobao.openuid.get", req.ToMap(), req.ToFileMap(), session)
|
|
||||||
var respStruct = response.TaobaoOpenuidGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoOpenuidGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
通过订单获取对应买家的openUID
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoOpenuidGetBytrade(req *request.TaobaoOpenuidGetBytradeRequest, session string) (*response.TaobaoOpenuidGetBytradeResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.ExecuteWithSession("taobao.openuid.get.bytrade", req.ToMap(), req.ToFileMap(), session)
|
|
||||||
var respStruct = response.TaobaoOpenuidGetBytradeResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoOpenuidGetBytrade error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
TOPDNS配置
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoHttpdnsGet(req *request.TaobaoHttpdnsGetRequest) (*response.TaobaoHttpdnsGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.httpdns.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoHttpdnsGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoHttpdnsGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取TOP通道解密秘钥
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoTopSecretGet(req *request.TaobaoTopSecretGetRequest) (*response.TaobaoTopSecretGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.top.secret.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTopSecretGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTopSecretGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
通过mixnick转换openuid
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoOpenuidGetBymixnick(req *request.TaobaoOpenuidGetBymixnickRequest) (*response.TaobaoOpenuidGetBymixnickResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.openuid.get.bymixnick", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoOpenuidGetBymixnickResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoOpenuidGetBymixnick error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
sdk信息回调
|
|
||||||
*/
|
|
||||||
func (ability *Ability304) TaobaoTopSdkFeedbackUpload(req *request.TaobaoTopSdkFeedbackUploadRequest) (*response.TaobaoTopSdkFeedbackUploadResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability304 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.top.sdk.feedback.upload", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTopSdkFeedbackUploadResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTopSdkFeedbackUpload error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoFilesGetTopDownloadRecordDo struct {
|
|
||||||
/*
|
|
||||||
下载链接 */
|
|
||||||
Url *string `json:"url,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
文件创建时间 */
|
|
||||||
Created *util.LocalTime `json:"created,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
下载链接状态。1:未下载。2:已下载 */
|
|
||||||
Status *int64 `json:"status,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoFilesGetTopDownloadRecordDo) SetUrl(v string) *TaobaoFilesGetTopDownloadRecordDo {
|
|
||||||
s.Url = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoFilesGetTopDownloadRecordDo) SetCreated(v util.LocalTime) *TaobaoFilesGetTopDownloadRecordDo {
|
|
||||||
s.Created = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoFilesGetTopDownloadRecordDo) SetStatus(v int64) *TaobaoFilesGetTopDownloadRecordDo {
|
|
||||||
s.Status = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoAppipGetRequest struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoAppipGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoAppipGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoFilesGetRequest struct {
|
|
||||||
/*
|
|
||||||
下载链接状态。1:未下载。2:已下载 */
|
|
||||||
Status *int64 `json:"status,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
搜索开始时间 */
|
|
||||||
StartDate *util.LocalTime `json:"start_date" required:"true" `
|
|
||||||
/*
|
|
||||||
搜索结束时间 */
|
|
||||||
EndDate *util.LocalTime `json:"end_date" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoFilesGetRequest) SetStatus(v int64) *TaobaoFilesGetRequest {
|
|
||||||
s.Status = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoFilesGetRequest) SetStartDate(v util.LocalTime) *TaobaoFilesGetRequest {
|
|
||||||
s.StartDate = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoFilesGetRequest) SetEndDate(v util.LocalTime) *TaobaoFilesGetRequest {
|
|
||||||
s.EndDate = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoFilesGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Status != nil {
|
|
||||||
paramMap["status"] = *req.Status
|
|
||||||
}
|
|
||||||
if req.StartDate != nil {
|
|
||||||
paramMap["start_date"] = *req.StartDate
|
|
||||||
}
|
|
||||||
if req.EndDate != nil {
|
|
||||||
paramMap["end_date"] = *req.EndDate
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoFilesGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoHttpdnsGetRequest struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoHttpdnsGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoHttpdnsGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoOpenuidGetBymixnickRequest struct {
|
|
||||||
/*
|
|
||||||
无线类应用获取到的混淆的nick */
|
|
||||||
MixNick *string `json:"mix_nick" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoOpenuidGetBymixnickRequest) SetMixNick(v string) *TaobaoOpenuidGetBymixnickRequest {
|
|
||||||
s.MixNick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoOpenuidGetBymixnickRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.MixNick != nil {
|
|
||||||
paramMap["mix_nick"] = *req.MixNick
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoOpenuidGetBymixnickRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoOpenuidGetBytradeRequest struct {
|
|
||||||
/*
|
|
||||||
订单ID */
|
|
||||||
Tid *int64 `json:"tid" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoOpenuidGetBytradeRequest) SetTid(v int64) *TaobaoOpenuidGetBytradeRequest {
|
|
||||||
s.Tid = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoOpenuidGetBytradeRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Tid != nil {
|
|
||||||
paramMap["tid"] = *req.Tid
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoOpenuidGetBytradeRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoOpenuidGetRequest struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoOpenuidGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoOpenuidGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTopAuthTokenCreateRequest struct {
|
|
||||||
/*
|
|
||||||
授权code,grantType==authorization_code 时需要 */
|
|
||||||
Code *string `json:"code" required:"true" `
|
|
||||||
/*
|
|
||||||
非必填,与生成code的uuid配对,使用方式参考文档 */
|
|
||||||
Uuid *string `json:"uuid,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTopAuthTokenCreateRequest) SetCode(v string) *TaobaoTopAuthTokenCreateRequest {
|
|
||||||
s.Code = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTopAuthTokenCreateRequest) SetUuid(v string) *TaobaoTopAuthTokenCreateRequest {
|
|
||||||
s.Uuid = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopAuthTokenCreateRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Code != nil {
|
|
||||||
paramMap["code"] = *req.Code
|
|
||||||
}
|
|
||||||
if req.Uuid != nil {
|
|
||||||
paramMap["uuid"] = *req.Uuid
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopAuthTokenCreateRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTopAuthTokenRefreshRequest struct {
|
|
||||||
/*
|
|
||||||
grantType==refresh_token 时需要 */
|
|
||||||
RefreshToken *string `json:"refresh_token" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTopAuthTokenRefreshRequest) SetRefreshToken(v string) *TaobaoTopAuthTokenRefreshRequest {
|
|
||||||
s.RefreshToken = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopAuthTokenRefreshRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.RefreshToken != nil {
|
|
||||||
paramMap["refresh_token"] = *req.RefreshToken
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopAuthTokenRefreshRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTopSdkFeedbackUploadRequest struct {
|
|
||||||
/*
|
|
||||||
1、回传加密信息 */
|
|
||||||
Type *string `json:"type" required:"true" `
|
|
||||||
/*
|
|
||||||
具体内容,json形式 */
|
|
||||||
Content *string `json:"content,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTopSdkFeedbackUploadRequest) SetType(v string) *TaobaoTopSdkFeedbackUploadRequest {
|
|
||||||
s.Type = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTopSdkFeedbackUploadRequest) SetContent(v string) *TaobaoTopSdkFeedbackUploadRequest {
|
|
||||||
s.Content = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopSdkFeedbackUploadRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Type != nil {
|
|
||||||
paramMap["type"] = *req.Type
|
|
||||||
}
|
|
||||||
if req.Content != nil {
|
|
||||||
paramMap["content"] = *req.Content
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopSdkFeedbackUploadRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTopSecretGetRequest struct {
|
|
||||||
/*
|
|
||||||
秘钥版本号 */
|
|
||||||
SecretVersion *int64 `json:"secret_version,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
伪随机数 */
|
|
||||||
RandomNum *string `json:"random_num" required:"true" `
|
|
||||||
/*
|
|
||||||
自定义用户id */
|
|
||||||
CustomerUserId *int64 `json:"customer_user_id,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTopSecretGetRequest) SetSecretVersion(v int64) *TaobaoTopSecretGetRequest {
|
|
||||||
s.SecretVersion = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTopSecretGetRequest) SetRandomNum(v string) *TaobaoTopSecretGetRequest {
|
|
||||||
s.RandomNum = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTopSecretGetRequest) SetCustomerUserId(v int64) *TaobaoTopSecretGetRequest {
|
|
||||||
s.CustomerUserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopSecretGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.SecretVersion != nil {
|
|
||||||
paramMap["secret_version"] = *req.SecretVersion
|
|
||||||
}
|
|
||||||
if req.RandomNum != nil {
|
|
||||||
paramMap["random_num"] = *req.RandomNum
|
|
||||||
}
|
|
||||||
if req.CustomerUserId != nil {
|
|
||||||
paramMap["customer_user_id"] = *req.CustomerUserId
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTopSecretGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoAppipGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
ISV发起请求服务器IP
|
|
||||||
*/
|
|
||||||
Ip string `json:"ip,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability304/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoFilesGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
results
|
|
||||||
*/
|
|
||||||
Results []domain.TaobaoFilesGetTopDownloadRecordDo `json:"results,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoHttpdnsGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
HTTP DNS配置信息
|
|
||||||
*/
|
|
||||||
Result string `json:"result,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
type TaobaoOpenuidGetBymixnickResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
OpenUID
|
|
||||||
*/
|
|
||||||
OpenUid string `json:"open_uid,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
type TaobaoOpenuidGetBytradeResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
当前交易tid对应买家的openuid
|
|
||||||
*/
|
|
||||||
OpenUid string `json:"open_uid,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoOpenuidGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
OpenUID
|
|
||||||
*/
|
|
||||||
OpenUid string `json:"open_uid,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
type TaobaoTopAuthTokenCreateResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回的是json信息,和之前调用https://oauth.taobao.com/tac/token https://oauth.alibaba.com/token 换token返回的字段信息一致
|
|
||||||
*/
|
|
||||||
TokenResult string `json:"token_result,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTopAuthTokenRefreshResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回的是json信息
|
|
||||||
*/
|
|
||||||
TokenResult string `json:"token_result,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTopSdkFeedbackUploadResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
控制回传间隔(单位:秒)
|
|
||||||
*/
|
|
||||||
UploadInterval int64 `json:"upload_interval,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTopSecretGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
下次更新秘钥间隔,单位(秒)
|
|
||||||
*/
|
|
||||||
Interval int64 `json:"interval,omitempty" `
|
|
||||||
/*
|
|
||||||
最长有效期,容灾使用,单位(秒)
|
|
||||||
*/
|
|
||||||
MaxInterval int64 `json:"max_interval,omitempty" `
|
|
||||||
/*
|
|
||||||
秘钥值
|
|
||||||
*/
|
|
||||||
Secret string `json:"secret,omitempty" `
|
|
||||||
/*
|
|
||||||
秘钥版本号
|
|
||||||
*/
|
|
||||||
SecretVersion int64 `json:"secret_version,omitempty" `
|
|
||||||
/*
|
|
||||||
app配置信息
|
|
||||||
*/
|
|
||||||
AppConfig string `json:"app_config,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
package ability305
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"log"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability305/request"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability305/response"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Ability305 struct {
|
|
||||||
Client *fliggysdk.TopClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewAbility305(client *fliggysdk.TopClient) *Ability305 {
|
|
||||||
return &Ability305{client}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取消息队列积压情况
|
|
||||||
*/
|
|
||||||
func (ability *Ability305) TaobaoTmcQueueGet(req *request.TaobaoTmcQueueGetRequest) (*response.TaobaoTmcQueueGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability305 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.queue.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcQueueGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcQueueGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取用户开通的topic列表
|
|
||||||
*/
|
|
||||||
func (ability *Ability305) TaobaoTmcUserTopicsGet(req *request.TaobaoTmcUserTopicsGetRequest) (*response.TaobaoTmcUserTopicsGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability305 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.user.topics.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcUserTopicsGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcUserTopicsGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type TaobaoTmcQueueGetTmcQueueInfo struct {
|
|
||||||
/*
|
|
||||||
当前队列当天读取量 */
|
|
||||||
GetTotal *int64 `json:"get_total,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
当前队列当天写入量 */
|
|
||||||
PutToal *int64 `json:"put_toal,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
TMC组名 */
|
|
||||||
Name *string `json:"name,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
消息队列Broker名称 */
|
|
||||||
BrokerName *string `json:"broker_name,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcQueueGetTmcQueueInfo) SetGetTotal(v int64) *TaobaoTmcQueueGetTmcQueueInfo {
|
|
||||||
s.GetTotal = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcQueueGetTmcQueueInfo) SetPutToal(v int64) *TaobaoTmcQueueGetTmcQueueInfo {
|
|
||||||
s.PutToal = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcQueueGetTmcQueueInfo) SetName(v string) *TaobaoTmcQueueGetTmcQueueInfo {
|
|
||||||
s.Name = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcQueueGetTmcQueueInfo) SetBrokerName(v string) *TaobaoTmcQueueGetTmcQueueInfo {
|
|
||||||
s.BrokerName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTmcQueueGetRequest struct {
|
|
||||||
/*
|
|
||||||
TMC组名 */
|
|
||||||
GroupName *string `json:"group_name" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcQueueGetRequest) SetGroupName(v string) *TaobaoTmcQueueGetRequest {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcQueueGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.GroupName != nil {
|
|
||||||
paramMap["group_name"] = *req.GroupName
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcQueueGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTmcUserTopicsGetRequest struct {
|
|
||||||
/*
|
|
||||||
卖家nick */
|
|
||||||
Nick *string `json:"nick,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcUserTopicsGetRequest) SetNick(v string) *TaobaoTmcUserTopicsGetRequest {
|
|
||||||
s.Nick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserTopicsGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Nick != nil {
|
|
||||||
paramMap["nick"] = *req.Nick
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserTopicsGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability305/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcQueueGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
队列详细信息
|
|
||||||
*/
|
|
||||||
Datas []domain.TaobaoTmcQueueGetTmcQueueInfo `json:"datas,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTmcUserTopicsGetResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
错误信息
|
|
||||||
*/
|
|
||||||
ResultMessage string `json:"result_message,omitempty" `
|
|
||||||
/*
|
|
||||||
topic列表
|
|
||||||
*/
|
|
||||||
Topics []string `json:"topics,omitempty" `
|
|
||||||
/*
|
|
||||||
错误码
|
|
||||||
*/
|
|
||||||
ResultCode string `json:"result_code,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,158 +0,0 @@
|
|||||||
package ability362
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"log"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/request"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/response"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Ability362 struct {
|
|
||||||
Client *fliggysdk.TopClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewAbility362(client *fliggysdk.TopClient) *Ability362 {
|
|
||||||
return &Ability362{client}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
飞猪门票核销通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) TaobaoTravelTicketOrderVerify(req *request.TaobaoTravelTicketOrderVerifyRequest) (*response.TaobaoTravelTicketOrderVerifyResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.travel.ticket.order.verify", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTravelTicketOrderVerifyResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTravelTicketOrderVerify error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
飞猪门票退票结果通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) TaobaoTravelTicketOrderRefund(req *request.TaobaoTravelTicketOrderRefundRequest) (*response.TaobaoTravelTicketOrderRefundResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.travel.ticket.order.refund", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTravelTicketOrderRefundResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTravelTicketOrderRefund error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
创单(支付订单)通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) AlitripTravelHotelticketOrderCreate(req *request.AlitripTravelHotelticketOrderCreateRequest) (*response.AlitripTravelHotelticketOrderCreateResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alitrip.travel.hotelticket.order.create", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlitripTravelHotelticketOrderCreateResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alitripTravelHotelticketOrderCreate error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
退款结结果通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) AlitripTravelHotelticketOrderRefund(req *request.AlitripTravelHotelticketOrderRefundRequest) (*response.AlitripTravelHotelticketOrderRefundResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alitrip.travel.hotelticket.order.refund", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlitripTravelHotelticketOrderRefundResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alitripTravelHotelticketOrderRefund error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单核销通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) AlitripTravelHotelticketOrderVerify(req *request.AlitripTravelHotelticketOrderVerifyRequest) (*response.AlitripTravelHotelticketOrderVerifyResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alitrip.travel.hotelticket.order.verify", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlitripTravelHotelticketOrderVerifyResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alitripTravelHotelticketOrderVerify error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品批量变更通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) AlitripTravelHotelticketProductProductupdate(req *request.AlitripTravelHotelticketProductProductupdateRequest) (*response.AlitripTravelHotelticketProductProductupdateResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alitrip.travel.hotelticket.product.productupdate", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlitripTravelHotelticketProductProductupdateResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alitripTravelHotelticketProductProductupdate error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品批量变更推送通知
|
|
||||||
*/
|
|
||||||
func (ability *Ability362) AlitripTravelHotelticketProductProductupdatepush(req *request.AlitripTravelHotelticketProductProductupdatepushRequest) (*response.AlitripTravelHotelticketProductProductupdatepushResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Ability362 topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alitrip.travel.hotelticket.product.productupdatepush", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlitripTravelHotelticketProductProductupdatepushResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alitripTravelHotelticketProductProductupdatepush error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO struct {
|
|
||||||
/*
|
|
||||||
凭证码 */
|
|
||||||
Code *string `json:"code,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
每张票或券可使用次数(如针对一码多刷,往返索道3张票1个码,每张票可使用次数为2,则该码可以刷6次 */
|
|
||||||
AvailableNums *int64 `json:"available_nums,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
证件号 */
|
|
||||||
CertificateId *string `json:"certificate_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
凭证类型 1:票码, 2:券码 */
|
|
||||||
Type *int64 `json:"type,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
二维码图片链接 */
|
|
||||||
Url *string `json:"url,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
凭证 可用/不可用 */
|
|
||||||
CanUse *bool `json:"can_use,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
已使用次数 */
|
|
||||||
UsageNums *int64 `json:"usage_nums,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
业务类型:1:门票, 2:酒店 */
|
|
||||||
BizType *int64 `json:"biz_type,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetCode(v string) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.Code = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetAvailableNums(v int64) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.AvailableNums = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetCertificateId(v string) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.CertificateId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetType(v int64) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.Type = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetUrl(v string) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.Url = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetCanUse(v bool) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.CanUse = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetUsageNums(v int64) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.UsageNums = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) SetBizType(v int64) *AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO {
|
|
||||||
s.BizType = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO struct {
|
|
||||||
/*
|
|
||||||
凭证码 */
|
|
||||||
Code *string `json:"code,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
使用时间:yyyy-MM-dd HH:mm:ss */
|
|
||||||
UseDate *string `json:"use_date,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
证件号 */
|
|
||||||
CertificateId *string `json:"certificate_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
凭证类型 1:票码, 2:券码 */
|
|
||||||
Type *int64 `json:"type,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
票或券 核销使用数量 */
|
|
||||||
UsageNums *int64 `json:"usage_nums,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
业务类型:1:门票, 2:酒店 */
|
|
||||||
BizType *int64 `json:"biz_type,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) SetCode(v string) *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO {
|
|
||||||
s.Code = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) SetUseDate(v string) *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO {
|
|
||||||
s.UseDate = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) SetCertificateId(v string) *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO {
|
|
||||||
s.CertificateId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) SetType(v int64) *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO {
|
|
||||||
s.Type = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) SetUsageNums(v int64) *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO {
|
|
||||||
s.UsageNums = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) SetBizType(v int64) *AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO {
|
|
||||||
s.BizType = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdateProductUpdateDTO struct {
|
|
||||||
/*
|
|
||||||
扩展参数 */
|
|
||||||
ExtendParams *string `json:"extend_params,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品变更通知类型 1:价格,2:库存,3:价库 */
|
|
||||||
NotifyType *int64 `json:"notify_type,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
系统商商品码 */
|
|
||||||
ProductId *string `json:"product_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
场次ID信息 */
|
|
||||||
SessionIds *[]string `json:"session_ids,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品变更开始时间 yyyy-MM-dd */
|
|
||||||
StartDate *string `json:"start_date,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品变更结束时间 yyyy-MM-dd */
|
|
||||||
EndDate *string `json:"end_date,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateProductUpdateDTO) SetExtendParams(v string) *AlitripTravelHotelticketProductProductupdateProductUpdateDTO {
|
|
||||||
s.ExtendParams = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateProductUpdateDTO) SetNotifyType(v int64) *AlitripTravelHotelticketProductProductupdateProductUpdateDTO {
|
|
||||||
s.NotifyType = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateProductUpdateDTO) SetProductId(v string) *AlitripTravelHotelticketProductProductupdateProductUpdateDTO {
|
|
||||||
s.ProductId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateProductUpdateDTO) SetSessionIds(v []string) *AlitripTravelHotelticketProductProductupdateProductUpdateDTO {
|
|
||||||
s.SessionIds = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateProductUpdateDTO) SetStartDate(v string) *AlitripTravelHotelticketProductProductupdateProductUpdateDTO {
|
|
||||||
s.StartDate = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateProductUpdateDTO) SetEndDate(v string) *AlitripTravelHotelticketProductProductupdateProductUpdateDTO {
|
|
||||||
s.EndDate = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO struct {
|
|
||||||
/*
|
|
||||||
日期。yyyy-MM-dd */
|
|
||||||
Date *string `json:"date,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
场次价库信息 */
|
|
||||||
Sessions *[]AlitripTravelHotelticketProductProductupdatepushProductSessionDTO `json:"sessions,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否可售卖;true:可售卖 */
|
|
||||||
CanSell *bool `json:"can_sell,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
库存 */
|
|
||||||
Stock *int64 `json:"stock,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品结算单价。单位:分 */
|
|
||||||
WholesalePrice *int64 `json:"wholesale_price,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品销售单价。单位:分 */
|
|
||||||
RetailPrice *int64 `json:"retail_price,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) SetDate(v string) *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO {
|
|
||||||
s.Date = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) SetSessions(v []AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO {
|
|
||||||
s.Sessions = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) SetCanSell(v bool) *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO {
|
|
||||||
s.CanSell = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) SetStock(v int64) *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO {
|
|
||||||
s.Stock = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) SetWholesalePrice(v int64) *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO {
|
|
||||||
s.WholesalePrice = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) SetRetailPrice(v int64) *AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO {
|
|
||||||
s.RetailPrice = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdatepushProductSessionDTO struct {
|
|
||||||
/*
|
|
||||||
开始时间。HH:mm */
|
|
||||||
StartTime *string `json:"start_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
场次ID */
|
|
||||||
SessionId *string `json:"session_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
结束时间。HH:mm */
|
|
||||||
EndTime *string `json:"end_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
场次库存 */
|
|
||||||
Stock *int64 `json:"stock,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品场次结算单价。单位:分 */
|
|
||||||
WholesalePrice *int64 `json:"wholesale_price,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品场次销售单价。单位:分 */
|
|
||||||
RetailPrice *int64 `json:"retail_price,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) SetStartTime(v string) *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO {
|
|
||||||
s.StartTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) SetSessionId(v string) *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO {
|
|
||||||
s.SessionId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) SetEndTime(v string) *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO {
|
|
||||||
s.EndTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) SetStock(v int64) *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO {
|
|
||||||
s.Stock = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) SetWholesalePrice(v int64) *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO {
|
|
||||||
s.WholesalePrice = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO) SetRetailPrice(v int64) *AlitripTravelHotelticketProductProductupdatepushProductSessionDTO {
|
|
||||||
s.RetailPrice = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO struct {
|
|
||||||
/*
|
|
||||||
日历价格库存信息 日历价格库存信息 */
|
|
||||||
PriceStocks *[]AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO `json:"price_stocks,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
产品变更通知类型 1:价格,2:库存,3:价库 */
|
|
||||||
NotifyType *int64 `json:"notify_type,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
系统商商品码 */
|
|
||||||
ProductId *string `json:"product_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
床型ID */
|
|
||||||
BedId *string `json:"bed_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
酒店ID */
|
|
||||||
HotelId *string `json:"hotel_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
房型ID */
|
|
||||||
RoomId *string `json:"room_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
扩展参数 */
|
|
||||||
ExtendParams *string `json:"extend_params,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
模式 默认值1;1:普通日历/预约商品(非通兑和非任选) defalutValue:1 */
|
|
||||||
Mode *int64 `json:"mode,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetPriceStocks(v []AlitripTravelHotelticketProductProductupdatepushProductPriceStockDTO) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.PriceStocks = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetNotifyType(v int64) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.NotifyType = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetProductId(v string) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.ProductId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetBedId(v string) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.BedId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetHotelId(v string) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.HotelId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetRoomId(v string) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.RoomId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetExtendParams(v string) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.ExtendParams = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) SetMode(v int64) *AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO {
|
|
||||||
s.Mode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type TaobaoTravelTicketOrderVerifyVoucherInfoDto struct {
|
|
||||||
/*
|
|
||||||
用户短信会收到的确认号 */
|
|
||||||
ConfirmCode *string `json:"confirm_code,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
凭证使用次数 */
|
|
||||||
UsedQuantity *int64 `json:"used_quantity,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
凭证使用时间,格式:yyyy-MM-dd HH:mm:ss */
|
|
||||||
UsedDate *string `json:"used_date,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyVoucherInfoDto) SetConfirmCode(v string) *TaobaoTravelTicketOrderVerifyVoucherInfoDto {
|
|
||||||
s.ConfirmCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyVoucherInfoDto) SetUsedQuantity(v int64) *TaobaoTravelTicketOrderVerifyVoucherInfoDto {
|
|
||||||
s.UsedQuantity = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyVoucherInfoDto) SetUsedDate(v string) *TaobaoTravelTicketOrderVerifyVoucherInfoDto {
|
|
||||||
s.UsedDate = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderCreateRequest struct {
|
|
||||||
/*
|
|
||||||
扩展参数 支持的key: ["hotelName" : "酒店名称", "roomName" : "房型名称", "productName" : "产品名称", "desc" : "描述"] value字符长度不超过100 */
|
|
||||||
ExtendParams *string `json:"extend_params,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
系统商订单号 */
|
|
||||||
OrderId *string `json:"order_id,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
创单出票失败原因信息 */
|
|
||||||
FailMsg *string `json:"fail_msg,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
凭证信息 无数据时传空集合 */
|
|
||||||
Vouchers *[]domain.AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO `json:"vouchers,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
创单结果状态 1:创单出票成功, 2:创单出票失败 */
|
|
||||||
Status *int64 `json:"status" required:"true" `
|
|
||||||
/*
|
|
||||||
飞猪订单号 */
|
|
||||||
FliggyOrderId *string `json:"fliggy_order_id" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateRequest) SetExtendParams(v string) *AlitripTravelHotelticketOrderCreateRequest {
|
|
||||||
s.ExtendParams = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateRequest) SetOrderId(v string) *AlitripTravelHotelticketOrderCreateRequest {
|
|
||||||
s.OrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateRequest) SetFailMsg(v string) *AlitripTravelHotelticketOrderCreateRequest {
|
|
||||||
s.FailMsg = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateRequest) SetVouchers(v []domain.AlitripTravelHotelticketOrderCreateHotelTicketVoucherDTO) *AlitripTravelHotelticketOrderCreateRequest {
|
|
||||||
s.Vouchers = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateRequest) SetStatus(v int64) *AlitripTravelHotelticketOrderCreateRequest {
|
|
||||||
s.Status = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderCreateRequest) SetFliggyOrderId(v string) *AlitripTravelHotelticketOrderCreateRequest {
|
|
||||||
s.FliggyOrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketOrderCreateRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.ExtendParams != nil {
|
|
||||||
paramMap["extend_params"] = *req.ExtendParams
|
|
||||||
}
|
|
||||||
if req.OrderId != nil {
|
|
||||||
paramMap["order_id"] = *req.OrderId
|
|
||||||
}
|
|
||||||
if req.FailMsg != nil {
|
|
||||||
paramMap["fail_msg"] = *req.FailMsg
|
|
||||||
}
|
|
||||||
if req.Vouchers != nil {
|
|
||||||
paramMap["vouchers"] = util.ConvertStructList(*req.Vouchers)
|
|
||||||
}
|
|
||||||
if req.Status != nil {
|
|
||||||
paramMap["status"] = *req.Status
|
|
||||||
}
|
|
||||||
if req.FliggyOrderId != nil {
|
|
||||||
paramMap["fliggy_order_id"] = *req.FliggyOrderId
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketOrderCreateRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderRefundRequest struct {
|
|
||||||
/*
|
|
||||||
系统商订单号 */
|
|
||||||
OrderId *string `json:"order_id,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
退款失败原因 */
|
|
||||||
FailMsg *string `json:"fail_msg,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
退款结果状态 1:退款成功 2:退款失败 */
|
|
||||||
Status *int64 `json:"status" required:"true" `
|
|
||||||
/*
|
|
||||||
飞猪订单号 */
|
|
||||||
FliggyOrderId *string `json:"fliggy_order_id" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketOrderRefundRequest) SetOrderId(v string) *AlitripTravelHotelticketOrderRefundRequest {
|
|
||||||
s.OrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderRefundRequest) SetFailMsg(v string) *AlitripTravelHotelticketOrderRefundRequest {
|
|
||||||
s.FailMsg = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderRefundRequest) SetStatus(v int64) *AlitripTravelHotelticketOrderRefundRequest {
|
|
||||||
s.Status = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderRefundRequest) SetFliggyOrderId(v string) *AlitripTravelHotelticketOrderRefundRequest {
|
|
||||||
s.FliggyOrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketOrderRefundRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.OrderId != nil {
|
|
||||||
paramMap["order_id"] = *req.OrderId
|
|
||||||
}
|
|
||||||
if req.FailMsg != nil {
|
|
||||||
paramMap["fail_msg"] = *req.FailMsg
|
|
||||||
}
|
|
||||||
if req.Status != nil {
|
|
||||||
paramMap["status"] = *req.Status
|
|
||||||
}
|
|
||||||
if req.FliggyOrderId != nil {
|
|
||||||
paramMap["fliggy_order_id"] = *req.FliggyOrderId
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketOrderRefundRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderVerifyRequest struct {
|
|
||||||
/*
|
|
||||||
扩展参数 */
|
|
||||||
ExtendParams *string `json:"extend_params,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
系统商订单号 */
|
|
||||||
OrderId *string `json:"order_id,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
凭证信息 */
|
|
||||||
Vouchers *[]domain.AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO `json:"vouchers,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
飞猪订单号 */
|
|
||||||
FliggyOrderId *string `json:"fliggy_order_id" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyRequest) SetExtendParams(v string) *AlitripTravelHotelticketOrderVerifyRequest {
|
|
||||||
s.ExtendParams = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyRequest) SetOrderId(v string) *AlitripTravelHotelticketOrderVerifyRequest {
|
|
||||||
s.OrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyRequest) SetVouchers(v []domain.AlitripTravelHotelticketOrderVerifyHotelTicketVerifyVoucherDTO) *AlitripTravelHotelticketOrderVerifyRequest {
|
|
||||||
s.Vouchers = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketOrderVerifyRequest) SetFliggyOrderId(v string) *AlitripTravelHotelticketOrderVerifyRequest {
|
|
||||||
s.FliggyOrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketOrderVerifyRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.ExtendParams != nil {
|
|
||||||
paramMap["extend_params"] = *req.ExtendParams
|
|
||||||
}
|
|
||||||
if req.OrderId != nil {
|
|
||||||
paramMap["order_id"] = *req.OrderId
|
|
||||||
}
|
|
||||||
if req.Vouchers != nil {
|
|
||||||
paramMap["vouchers"] = util.ConvertStructList(*req.Vouchers)
|
|
||||||
}
|
|
||||||
if req.FliggyOrderId != nil {
|
|
||||||
paramMap["fliggy_order_id"] = *req.FliggyOrderId
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketOrderVerifyRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdateRequest struct {
|
|
||||||
/*
|
|
||||||
系统商分配给飞猪卖家的账号 */
|
|
||||||
AccessKey *string `json:"access_key" required:"true" `
|
|
||||||
/*
|
|
||||||
变更的产品信息 */
|
|
||||||
ProductUpdates *[]domain.AlitripTravelHotelticketProductProductupdateProductUpdateDTO `json:"product_updates" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateRequest) SetAccessKey(v string) *AlitripTravelHotelticketProductProductupdateRequest {
|
|
||||||
s.AccessKey = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdateRequest) SetProductUpdates(v []domain.AlitripTravelHotelticketProductProductupdateProductUpdateDTO) *AlitripTravelHotelticketProductProductupdateRequest {
|
|
||||||
s.ProductUpdates = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketProductProductupdateRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.AccessKey != nil {
|
|
||||||
paramMap["access_key"] = *req.AccessKey
|
|
||||||
}
|
|
||||||
if req.ProductUpdates != nil {
|
|
||||||
paramMap["product_updates"] = util.ConvertStructList(*req.ProductUpdates)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketProductProductupdateRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdatepushRequest struct {
|
|
||||||
/*
|
|
||||||
系统商分配给飞猪卖家的账号 */
|
|
||||||
AccessKey *string `json:"access_key" required:"true" `
|
|
||||||
/*
|
|
||||||
变更的产品信息 */
|
|
||||||
ProductUpdates *[]domain.AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO `json:"product_updates" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushRequest) SetAccessKey(v string) *AlitripTravelHotelticketProductProductupdatepushRequest {
|
|
||||||
s.AccessKey = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlitripTravelHotelticketProductProductupdatepushRequest) SetProductUpdates(v []domain.AlitripTravelHotelticketProductProductupdatepushProductUpdatePushDTO) *AlitripTravelHotelticketProductProductupdatepushRequest {
|
|
||||||
s.ProductUpdates = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketProductProductupdatepushRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.AccessKey != nil {
|
|
||||||
paramMap["access_key"] = *req.AccessKey
|
|
||||||
}
|
|
||||||
if req.ProductUpdates != nil {
|
|
||||||
paramMap["product_updates"] = util.ConvertStructList(*req.ProductUpdates)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlitripTravelHotelticketProductProductupdatepushRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTravelTicketOrderRefundRequest struct {
|
|
||||||
/*
|
|
||||||
退票数量 */
|
|
||||||
RefundNum *int64 `json:"refund_num,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
下单时订单ID */
|
|
||||||
OrderId *int64 `json:"order_id" required:"true" `
|
|
||||||
/*
|
|
||||||
退票结果;1: 退票成功;2: 退票失败 */
|
|
||||||
RefundStatus *int64 `json:"refund_status" required:"true" `
|
|
||||||
/*
|
|
||||||
退票失败理由 */
|
|
||||||
RefundFailureReason *string `json:"refund_failure_reason,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
退票的批次号 */
|
|
||||||
RefundBatchNo *string `json:"refund_batch_no,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTravelTicketOrderRefundRequest) SetRefundNum(v int64) *TaobaoTravelTicketOrderRefundRequest {
|
|
||||||
s.RefundNum = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderRefundRequest) SetOrderId(v int64) *TaobaoTravelTicketOrderRefundRequest {
|
|
||||||
s.OrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderRefundRequest) SetRefundStatus(v int64) *TaobaoTravelTicketOrderRefundRequest {
|
|
||||||
s.RefundStatus = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderRefundRequest) SetRefundFailureReason(v string) *TaobaoTravelTicketOrderRefundRequest {
|
|
||||||
s.RefundFailureReason = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderRefundRequest) SetRefundBatchNo(v string) *TaobaoTravelTicketOrderRefundRequest {
|
|
||||||
s.RefundBatchNo = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTravelTicketOrderRefundRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.RefundNum != nil {
|
|
||||||
paramMap["refund_num"] = *req.RefundNum
|
|
||||||
}
|
|
||||||
if req.OrderId != nil {
|
|
||||||
paramMap["order_id"] = *req.OrderId
|
|
||||||
}
|
|
||||||
if req.RefundStatus != nil {
|
|
||||||
paramMap["refund_status"] = *req.RefundStatus
|
|
||||||
}
|
|
||||||
if req.RefundFailureReason != nil {
|
|
||||||
paramMap["refund_failure_reason"] = *req.RefundFailureReason
|
|
||||||
}
|
|
||||||
if req.RefundBatchNo != nil {
|
|
||||||
paramMap["refund_batch_no"] = *req.RefundBatchNo
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTravelTicketOrderRefundRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/ability362/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTravelTicketOrderVerifyRequest struct {
|
|
||||||
/*
|
|
||||||
核销次数 */
|
|
||||||
CheckNum *int64 `json:"check_num,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
下单订单ID */
|
|
||||||
OrderId *int64 `json:"order_id,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
门票取消数量 */
|
|
||||||
ReturnNum *int64 `json:"return_num,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
门票总共允许核销次数 */
|
|
||||||
TotalNum *int64 `json:"total_num,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
外部订单ID */
|
|
||||||
OutOrderId *string `json:"out_order_id,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
(新接入使用voucher_infos)用户短信会收到的确认号 */
|
|
||||||
ConfirmCode *string `json:"confirm_code,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
使用凭证信息 */
|
|
||||||
VoucherInfos *[]domain.TaobaoTravelTicketOrderVerifyVoucherInfoDto `json:"voucher_infos,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
供应商核销回调类型:0表示使用本次核销数量(常规),1表示使用总核销数量(已使用+本次) */
|
|
||||||
WriteOffType *int64 `json:"write_off_type,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetCheckNum(v int64) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.CheckNum = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetOrderId(v int64) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.OrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetReturnNum(v int64) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.ReturnNum = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetTotalNum(v int64) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.TotalNum = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetOutOrderId(v string) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.OutOrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetConfirmCode(v string) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.ConfirmCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetVoucherInfos(v []domain.TaobaoTravelTicketOrderVerifyVoucherInfoDto) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.VoucherInfos = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTravelTicketOrderVerifyRequest) SetWriteOffType(v int64) *TaobaoTravelTicketOrderVerifyRequest {
|
|
||||||
s.WriteOffType = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTravelTicketOrderVerifyRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.CheckNum != nil {
|
|
||||||
paramMap["check_num"] = *req.CheckNum
|
|
||||||
}
|
|
||||||
if req.OrderId != nil {
|
|
||||||
paramMap["order_id"] = *req.OrderId
|
|
||||||
}
|
|
||||||
if req.ReturnNum != nil {
|
|
||||||
paramMap["return_num"] = *req.ReturnNum
|
|
||||||
}
|
|
||||||
if req.TotalNum != nil {
|
|
||||||
paramMap["total_num"] = *req.TotalNum
|
|
||||||
}
|
|
||||||
if req.OutOrderId != nil {
|
|
||||||
paramMap["out_order_id"] = *req.OutOrderId
|
|
||||||
}
|
|
||||||
if req.ConfirmCode != nil {
|
|
||||||
paramMap["confirm_code"] = *req.ConfirmCode
|
|
||||||
}
|
|
||||||
if req.VoucherInfos != nil {
|
|
||||||
paramMap["voucher_infos"] = util.ConvertStructList(*req.VoucherInfos)
|
|
||||||
}
|
|
||||||
if req.WriteOffType != nil {
|
|
||||||
paramMap["write_off_type"] = *req.WriteOffType
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTravelTicketOrderVerifyRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderCreateResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderRefundResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketOrderVerifyResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdateResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type AlitripTravelHotelticketProductProductupdatepushResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否成功
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTravelTicketOrderRefundResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
系统自动生成
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
type TaobaoTravelTicketOrderVerifyResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
成功状态true or false
|
|
||||||
*/
|
|
||||||
IsSuccess bool `json:"is_success,omitempty" `
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
package fliggysdk
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
sdk使用常量,请勿修改
|
|
||||||
*/
|
|
||||||
const (
|
|
||||||
// SdkVersion 版本号
|
|
||||||
SdkVersion = "new_go_sdk_20240805"
|
|
||||||
|
|
||||||
// ApiFormat api格式
|
|
||||||
ApiFormat = "json"
|
|
||||||
|
|
||||||
// SignMethod 签名算法
|
|
||||||
SignMethod = "hmac-sha256"
|
|
||||||
|
|
||||||
// Version 网关版本号
|
|
||||||
TopVersion = "2.0"
|
|
||||||
|
|
||||||
// DateFormat 日期格式
|
|
||||||
DateFormat = "2006-01-02 15:04:05"
|
|
||||||
)
|
|
||||||
@ -1,178 +0,0 @@
|
|||||||
package defaultability
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"log"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/request"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/response"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Defaultability struct {
|
|
||||||
Client *fliggysdk.TopClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewDefaultability(client *fliggysdk.TopClient) *Defaultability {
|
|
||||||
return &Defaultability{client}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
飞猪CPS通用卡券发放接口
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) AlibabaFliggyCpsCouponOffer(req *request.AlibabaFliggyCpsCouponOfferRequest) (*response.AlibabaFliggyCpsCouponOfferResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alibaba.fliggy.cps.coupon.offer", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlibabaFliggyCpsCouponOfferResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alibabaFliggyCpsCouponOffer error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
关键词过滤匹配
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) TaobaoKfcKeywordSearch(req *request.TaobaoKfcKeywordSearchRequest, session string) (*response.TaobaoKfcKeywordSearchResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.ExecuteWithSession("taobao.kfc.keyword.search", req.ToMap(), req.ToFileMap(), session)
|
|
||||||
var respStruct = response.TaobaoKfcKeywordSearchResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoKfcKeywordSearch error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取商家所在分组及其已授权(广播)消息topics
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) TaobaoTmcUserGet(req *request.TaobaoTmcUserGetRequest) (*response.TaobaoTmcUserGetResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.user.get", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcUserGetResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcUserGet error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
发布单条消息
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) TaobaoTmcMessageProduce(req *request.TaobaoTmcMessageProduceRequest) (*response.TaobaoTmcMessageProduceResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.message.produce", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcMessageProduceResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcMessageProduce error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
取消用户的消息服务
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) TaobaoTmcUserCancel(req *request.TaobaoTmcUserCancelRequest) (*response.TaobaoTmcUserCancelResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("taobao.tmc.user.cancel", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.TaobaoTmcUserCancelResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcUserCancel error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
为已授权的用户开通消息服务
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) TaobaoTmcUserPermit(req *request.TaobaoTmcUserPermitRequest, session string) (*response.TaobaoTmcUserPermitResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.ExecuteWithSession("taobao.tmc.user.permit", req.ToMap(), req.ToFileMap(), session)
|
|
||||||
var respStruct = response.TaobaoTmcUserPermitResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("taobaoTmcUserPermit error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
飞猪CPS通用三方卡券发放接口
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) AlibabaFliggyCpsCouponIssue(req *request.AlibabaFliggyCpsCouponIssueRequest) (*response.AlibabaFliggyCpsCouponIssueResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alibaba.fliggy.cps.coupon.issue", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlibabaFliggyCpsCouponIssueResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alibabaFliggyCpsCouponIssue error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
读取飞猪分销订单列表
|
|
||||||
*/
|
|
||||||
func (ability *Defaultability) AlibabaFliggyPromoteOrdersList(req *request.AlibabaFliggyPromoteOrdersListRequest) (*response.AlibabaFliggyPromoteOrdersListResponse, error) {
|
|
||||||
if ability.Client == nil {
|
|
||||||
return nil, errors.New("Defaultability topClient is nil")
|
|
||||||
}
|
|
||||||
var jsonStr, err = ability.Client.Execute("alibaba.fliggy.promote.orders.list", req.ToMap(), req.ToFileMap())
|
|
||||||
var respStruct = response.AlibabaFliggyPromoteOrdersListResponse{}
|
|
||||||
if err != nil {
|
|
||||||
log.Println("alibabaFliggyPromoteOrdersList error", err)
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
|
||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
|
||||||
respStruct.Body = jsonStr
|
|
||||||
}
|
|
||||||
return &respStruct, err
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponIssueBuyUserRequest struct {
|
|
||||||
/*
|
|
||||||
推广者淘宝用户ID */
|
|
||||||
PromoteUserId *int64 `json:"promote_user_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
手机号 */
|
|
||||||
Mobile *string `json:"mobile,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
推广计划ID */
|
|
||||||
PlanId *int64 `json:"plan_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
二级推广者ID */
|
|
||||||
SecondPromoteUserId *string `json:"second_promote_user_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
渠道标识符 */
|
|
||||||
ChannelCode *string `json:"channel_code,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueBuyUserRequest) SetPromoteUserId(v int64) *AlibabaFliggyCpsCouponIssueBuyUserRequest {
|
|
||||||
s.PromoteUserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueBuyUserRequest) SetMobile(v string) *AlibabaFliggyCpsCouponIssueBuyUserRequest {
|
|
||||||
s.Mobile = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueBuyUserRequest) SetPlanId(v int64) *AlibabaFliggyCpsCouponIssueBuyUserRequest {
|
|
||||||
s.PlanId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueBuyUserRequest) SetSecondPromoteUserId(v string) *AlibabaFliggyCpsCouponIssueBuyUserRequest {
|
|
||||||
s.SecondPromoteUserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueBuyUserRequest) SetChannelCode(v string) *AlibabaFliggyCpsCouponIssueBuyUserRequest {
|
|
||||||
s.ChannelCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponIssueCollectCouponResponse struct {
|
|
||||||
/*
|
|
||||||
券信息详情 */
|
|
||||||
Coupons *string `json:"coupons,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
true:第一次领取,false:非第一次领取 */
|
|
||||||
FirstApply *bool `json:"first_apply,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueCollectCouponResponse) SetCoupons(v string) *AlibabaFliggyCpsCouponIssueCollectCouponResponse {
|
|
||||||
s.Coupons = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueCollectCouponResponse) SetFirstApply(v bool) *AlibabaFliggyCpsCouponIssueCollectCouponResponse {
|
|
||||||
s.FirstApply = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponIssueResult struct {
|
|
||||||
/*
|
|
||||||
true:成功,false:失败 */
|
|
||||||
Success *bool `json:"success,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
领券详情 */
|
|
||||||
Model *AlibabaFliggyCpsCouponIssueCollectCouponResponse `json:"model,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回码中文解释 */
|
|
||||||
MsgInfo *string `json:"msg_info,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回码 */
|
|
||||||
MsgCode *string `json:"msg_code,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueResult) SetSuccess(v bool) *AlibabaFliggyCpsCouponIssueResult {
|
|
||||||
s.Success = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueResult) SetModel(v AlibabaFliggyCpsCouponIssueCollectCouponResponse) *AlibabaFliggyCpsCouponIssueResult {
|
|
||||||
s.Model = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueResult) SetMsgInfo(v string) *AlibabaFliggyCpsCouponIssueResult {
|
|
||||||
s.MsgInfo = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueResult) SetMsgCode(v string) *AlibabaFliggyCpsCouponIssueResult {
|
|
||||||
s.MsgCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponOfferBuyUserRequest struct {
|
|
||||||
/*
|
|
||||||
推广者淘宝用户ID */
|
|
||||||
PromoteUserId *int64 `json:"promote_user_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
手机号码 */
|
|
||||||
Mobile *string `json:"mobile,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
推广者计划ID,由对接小二提供 */
|
|
||||||
PlanId *int64 `json:"plan_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
自定义字符串,小于50个字符串,可用来区分同渠道的不同资源位 */
|
|
||||||
SecondPromoteUserId *string `json:"second_promote_user_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
渠道标识符,如自己渠道的拼音,由对接小二提供 */
|
|
||||||
ChannelCode *string `json:"channel_code,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferBuyUserRequest) SetPromoteUserId(v int64) *AlibabaFliggyCpsCouponOfferBuyUserRequest {
|
|
||||||
s.PromoteUserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferBuyUserRequest) SetMobile(v string) *AlibabaFliggyCpsCouponOfferBuyUserRequest {
|
|
||||||
s.Mobile = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferBuyUserRequest) SetPlanId(v int64) *AlibabaFliggyCpsCouponOfferBuyUserRequest {
|
|
||||||
s.PlanId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferBuyUserRequest) SetSecondPromoteUserId(v string) *AlibabaFliggyCpsCouponOfferBuyUserRequest {
|
|
||||||
s.SecondPromoteUserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferBuyUserRequest) SetChannelCode(v string) *AlibabaFliggyCpsCouponOfferBuyUserRequest {
|
|
||||||
s.ChannelCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponOfferCollectCouponResponse struct {
|
|
||||||
/*
|
|
||||||
券信息详情 */
|
|
||||||
Coupons *string `json:"coupons,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
true:第一次领取 false:非第一次领取(即重复领取) */
|
|
||||||
FirstApply *bool `json:"first_apply,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferCollectCouponResponse) SetCoupons(v string) *AlibabaFliggyCpsCouponOfferCollectCouponResponse {
|
|
||||||
s.Coupons = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferCollectCouponResponse) SetFirstApply(v bool) *AlibabaFliggyCpsCouponOfferCollectCouponResponse {
|
|
||||||
s.FirstApply = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponOfferResult struct {
|
|
||||||
/*
|
|
||||||
true:成功 false:失败 */
|
|
||||||
Success *bool `json:"success,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
领取券详情 */
|
|
||||||
Model *AlibabaFliggyCpsCouponOfferCollectCouponResponse `json:"model,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回码中文解释 */
|
|
||||||
MsgInfo *string `json:"msg_info,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回码 */
|
|
||||||
MsgCode *string `json:"msg_code,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferResult) SetSuccess(v bool) *AlibabaFliggyCpsCouponOfferResult {
|
|
||||||
s.Success = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferResult) SetModel(v AlibabaFliggyCpsCouponOfferCollectCouponResponse) *AlibabaFliggyCpsCouponOfferResult {
|
|
||||||
s.Model = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferResult) SetMsgInfo(v string) *AlibabaFliggyCpsCouponOfferResult {
|
|
||||||
s.MsgInfo = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferResult) SetMsgCode(v string) *AlibabaFliggyCpsCouponOfferResult {
|
|
||||||
s.MsgCode = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,124 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyPromoteOrdersListOrder struct {
|
|
||||||
/*
|
|
||||||
佣金金额。单位:元 */
|
|
||||||
CommissionMoney *string `json:"commission_money,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
佣金状态。中文描述,建议直接使用,目前有:提现成功/提现中/追缴成功/追缴中 */
|
|
||||||
CommissionStatus *string `json:"commission_status,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
封面图 */
|
|
||||||
CoverUrl *string `json:"cover_url,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
宝贝名称 */
|
|
||||||
ItemName *string `json:"item_name,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
佣金修改时间。当订单状态发生变化时佣金会重新计算,比如订单退款、订单关闭 等场景 */
|
|
||||||
ModifyTime *string `json:"modify_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单ID */
|
|
||||||
OrderId *string `json:"order_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单金额。单位:元 */
|
|
||||||
OrderMoney *string `json:"order_money,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单状态。中文描述,建议直接引用。比如:支付成功/订单关闭/交易成功 */
|
|
||||||
OrderStatus *string `json:"order_status,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单创建时间 */
|
|
||||||
OrderTime *string `json:"order_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
是否是追缴订单(当订单佣金被提现,订单又发生了退款时可能产生追缴订单),追缴订单的佣金金额为负 */
|
|
||||||
Recover *bool `json:"recover,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
fpsid 跟踪时的外部自定义参数 */
|
|
||||||
Fpsid *string `json:"fpsid,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
佣金结算时间。指订单确定发放佣金的时间(非可提现时间) */
|
|
||||||
SettleTime *string `json:"settle_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单支付时间 */
|
|
||||||
PayTime *string `json:"pay_time,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
订单状态枚举值,建议使用该字段判断订单状态。(20:支付成功、30:交易成功、40:订单关闭) */
|
|
||||||
OrderStatusValue *int64 `json:"order_status_value,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
0:优惠劵,1:标准酒店,2:酒店tate,3:火车票,4:宝贝 */
|
|
||||||
PromotePlanEntityType *int64 `json:"promote_plan_entity_type,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetCommissionMoney(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.CommissionMoney = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetCommissionStatus(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.CommissionStatus = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetCoverUrl(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.CoverUrl = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetItemName(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.ItemName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetModifyTime(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.ModifyTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetOrderId(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.OrderId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetOrderMoney(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.OrderMoney = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetOrderStatus(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.OrderStatus = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetOrderTime(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.OrderTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetRecover(v bool) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.Recover = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetFpsid(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.Fpsid = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetSettleTime(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.SettleTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetPayTime(v string) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.PayTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetOrderStatusValue(v int64) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.OrderStatusValue = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListOrder) SetPromotePlanEntityType(v int64) *AlibabaFliggyPromoteOrdersListOrder {
|
|
||||||
s.PromotePlanEntityType = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type AlibabaFliggyPromoteOrdersListPromoteUserOrderListResponse struct {
|
|
||||||
/*
|
|
||||||
订单列表 */
|
|
||||||
List *[]AlibabaFliggyPromoteOrdersListOrder `json:"list,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListPromoteUserOrderListResponse) SetList(v []AlibabaFliggyPromoteOrdersListOrder) *AlibabaFliggyPromoteOrdersListPromoteUserOrderListResponse {
|
|
||||||
s.List = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
type TaobaoKfcKeywordSearchKfcSearchResult struct {
|
|
||||||
/*
|
|
||||||
是否匹配到关键词,匹配到则为true. */
|
|
||||||
Matched *bool `json:"matched,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
匹配到的关键词的等级,值为null,或为A、B、C、D。
|
|
||||||
当匹配不到关键词时,值为null,否则值为A、B、C、D中的一个。
|
|
||||||
A、B、C、D等级按严重程度从高至低排列。 */
|
|
||||||
Level *string `json:"level,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
过滤后的文本:
|
|
||||||
当匹配到B等级的词时,文本中的关键词被替换为*号,content即为关键词替换后的文本;
|
|
||||||
其他情况,content始终为null */
|
|
||||||
Content *string `json:"content,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoKfcKeywordSearchKfcSearchResult) SetMatched(v bool) *TaobaoKfcKeywordSearchKfcSearchResult {
|
|
||||||
s.Matched = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoKfcKeywordSearchKfcSearchResult) SetLevel(v string) *TaobaoKfcKeywordSearchKfcSearchResult {
|
|
||||||
s.Level = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoKfcKeywordSearchKfcSearchResult) SetContent(v string) *TaobaoKfcKeywordSearchKfcSearchResult {
|
|
||||||
s.Content = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
package domain
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcUserGetTmcUser struct {
|
|
||||||
/*
|
|
||||||
用户首次开通时间 */
|
|
||||||
Created *util.LocalTime `json:"created,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
接收用户消息的组名 */
|
|
||||||
GroupName *string `json:"group_name,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户授权是否有效,true表示授权有效,false表示授权过期 */
|
|
||||||
IsValid *bool `json:"is_valid,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户最后开通时间 */
|
|
||||||
Modified *util.LocalTime `json:"modified,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户开通的消息类型列表。如果为空表示应用开通的所有类型 */
|
|
||||||
Topics *[]string `json:"topics,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户ID */
|
|
||||||
UserId *int64 `json:"user_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户昵称 */
|
|
||||||
UserNick *string `json:"user_nick,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户 */
|
|
||||||
UserPlatform *string `json:"user_platform,omitempty" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetCreated(v util.LocalTime) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.Created = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetGroupName(v string) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.GroupName = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetIsValid(v bool) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.IsValid = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetModified(v util.LocalTime) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.Modified = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetTopics(v []string) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.Topics = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetUserId(v int64) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.UserId = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetUserNick(v string) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.UserNick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetTmcUser) SetUserPlatform(v string) *TaobaoTmcUserGetTmcUser {
|
|
||||||
s.UserPlatform = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponIssueRequest struct {
|
|
||||||
/*
|
|
||||||
请求入参 */
|
|
||||||
BuyUserRequest *domain.AlibabaFliggyCpsCouponIssueBuyUserRequest `json:"buy_user_request" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponIssueRequest) SetBuyUserRequest(v domain.AlibabaFliggyCpsCouponIssueBuyUserRequest) *AlibabaFliggyCpsCouponIssueRequest {
|
|
||||||
s.BuyUserRequest = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlibabaFliggyCpsCouponIssueRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.BuyUserRequest != nil {
|
|
||||||
paramMap["buy_user_request"] = util.ConvertStruct(*req.BuyUserRequest)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlibabaFliggyCpsCouponIssueRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/domain"
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponOfferRequest struct {
|
|
||||||
/*
|
|
||||||
请求入参 */
|
|
||||||
BuyUserRequest *domain.AlibabaFliggyCpsCouponOfferBuyUserRequest `json:"buy_user_request" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyCpsCouponOfferRequest) SetBuyUserRequest(v domain.AlibabaFliggyCpsCouponOfferBuyUserRequest) *AlibabaFliggyCpsCouponOfferRequest {
|
|
||||||
s.BuyUserRequest = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlibabaFliggyCpsCouponOfferRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.BuyUserRequest != nil {
|
|
||||||
paramMap["buy_user_request"] = util.ConvertStruct(*req.BuyUserRequest)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlibabaFliggyCpsCouponOfferRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlibabaFliggyPromoteOrdersListRequest struct {
|
|
||||||
/*
|
|
||||||
页码:从0开始第一页 defalutValue<EFBFBD><EFBFBD>0 */
|
|
||||||
PageNo *int64 `json:"page_no,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
过滤早于(不包含)指定修改时间的订单 */
|
|
||||||
BeforeModifyTime *util.LocalTime `json:"before_modify_time,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
过滤晚于(不包含)指定修改时间的订单 */
|
|
||||||
AfterModifyTime *util.LocalTime `json:"after_modify_time,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListRequest) SetPageNo(v int64) *AlibabaFliggyPromoteOrdersListRequest {
|
|
||||||
s.PageNo = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListRequest) SetBeforeModifyTime(v util.LocalTime) *AlibabaFliggyPromoteOrdersListRequest {
|
|
||||||
s.BeforeModifyTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *AlibabaFliggyPromoteOrdersListRequest) SetAfterModifyTime(v util.LocalTime) *AlibabaFliggyPromoteOrdersListRequest {
|
|
||||||
s.AfterModifyTime = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlibabaFliggyPromoteOrdersListRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.PageNo != nil {
|
|
||||||
paramMap["page_no"] = *req.PageNo
|
|
||||||
}
|
|
||||||
if req.BeforeModifyTime != nil {
|
|
||||||
paramMap["before_modify_time"] = *req.BeforeModifyTime
|
|
||||||
}
|
|
||||||
if req.AfterModifyTime != nil {
|
|
||||||
paramMap["after_modify_time"] = *req.AfterModifyTime
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *AlibabaFliggyPromoteOrdersListRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoKfcKeywordSearchRequest struct {
|
|
||||||
/*
|
|
||||||
发布信息的淘宝会员名,可以不传 */
|
|
||||||
Nick *string `json:"nick,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
应用点,分为一级应用点、二级应用点。其中一级应用点通常是指某一个系统或产品,比如淘宝的商品应用(taobao_auction);二级应用点,是指一级应用点下的具体的分类,比如商品标题(title)、商品描述(content)。不同的二级应用可以设置不同关键词。
|
|
||||||
|
|
||||||
这里的apply参数是由一级应用点与二级应用点合起来的字符(一级应用点+"."+二级应用点),如taobao_auction.title。
|
|
||||||
|
|
||||||
|
|
||||||
通常apply参数是不需要传递的。如有特殊需求(比如特殊的过滤需求,需要自己维护一套自己词库),需传递此参数。 */
|
|
||||||
Apply *string `json:"apply,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
需要过滤的文本信息 */
|
|
||||||
Content *string `json:"content" required:"true" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoKfcKeywordSearchRequest) SetNick(v string) *TaobaoKfcKeywordSearchRequest {
|
|
||||||
s.Nick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoKfcKeywordSearchRequest) SetApply(v string) *TaobaoKfcKeywordSearchRequest {
|
|
||||||
s.Apply = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoKfcKeywordSearchRequest) SetContent(v string) *TaobaoKfcKeywordSearchRequest {
|
|
||||||
s.Content = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoKfcKeywordSearchRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Nick != nil {
|
|
||||||
paramMap["nick"] = *req.Nick
|
|
||||||
}
|
|
||||||
if req.Apply != nil {
|
|
||||||
paramMap["apply"] = *req.Apply
|
|
||||||
}
|
|
||||||
if req.Content != nil {
|
|
||||||
paramMap["content"] = *req.Content
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoKfcKeywordSearchRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTmcMessageProduceRequest struct {
|
|
||||||
/*
|
|
||||||
消息内容的JSON表述,必须按照topic的定义来填充 */
|
|
||||||
Content *string `json:"content" required:"true" `
|
|
||||||
/*
|
|
||||||
消息的扩增属性,用json格式表示 */
|
|
||||||
ExContent *string `json:"ex_content,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
直发消息需要传入目标appkey */
|
|
||||||
TargetAppkey *string `json:"target_appkey,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
目标分组,一般为default defalutValue<EFBFBD><EFBFBD>default */
|
|
||||||
TargetGroup *string `json:"target_group,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
消息类型 */
|
|
||||||
Topic *string `json:"topic" required:"true" `
|
|
||||||
/*
|
|
||||||
回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。 */
|
|
||||||
MediaContent *[]byte `json:"media_content,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。 */
|
|
||||||
MediaContent2 *[]byte `json:"media_content2,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。 */
|
|
||||||
MediaContent3 *[]byte `json:"media_content3,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。 */
|
|
||||||
MediaContent5 *[]byte `json:"media_content5,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。 */
|
|
||||||
MediaContent4 *[]byte `json:"media_content4,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
延时参数 时间戳 预期发送时间 defalutValue<EFBFBD><EFBFBD>0 */
|
|
||||||
DelayMillis *int64 `json:"delay_millis,omitempty" required:"false" `
|
|
||||||
/*
|
|
||||||
提前过期 相对时间差 毫秒 defalutValue<EFBFBD><EFBFBD>0 */
|
|
||||||
ExpiresMillis *int64 `json:"expires_millis,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetContent(v string) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.Content = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetExContent(v string) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.ExContent = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetTargetAppkey(v string) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.TargetAppkey = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetTargetGroup(v string) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.TargetGroup = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetTopic(v string) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.Topic = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetMediaContent(v []byte) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.MediaContent = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetMediaContent2(v []byte) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.MediaContent2 = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetMediaContent3(v []byte) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.MediaContent3 = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetMediaContent5(v []byte) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.MediaContent5 = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetMediaContent4(v []byte) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.MediaContent4 = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetDelayMillis(v int64) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.DelayMillis = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcMessageProduceRequest) SetExpiresMillis(v int64) *TaobaoTmcMessageProduceRequest {
|
|
||||||
s.ExpiresMillis = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessageProduceRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Content != nil {
|
|
||||||
paramMap["content"] = *req.Content
|
|
||||||
}
|
|
||||||
if req.ExContent != nil {
|
|
||||||
paramMap["ex_content"] = *req.ExContent
|
|
||||||
}
|
|
||||||
if req.TargetAppkey != nil {
|
|
||||||
paramMap["target_appkey"] = *req.TargetAppkey
|
|
||||||
}
|
|
||||||
if req.TargetGroup != nil {
|
|
||||||
paramMap["target_group"] = *req.TargetGroup
|
|
||||||
}
|
|
||||||
if req.Topic != nil {
|
|
||||||
paramMap["topic"] = *req.Topic
|
|
||||||
}
|
|
||||||
if req.DelayMillis != nil {
|
|
||||||
paramMap["delay_millis"] = *req.DelayMillis
|
|
||||||
}
|
|
||||||
if req.ExpiresMillis != nil {
|
|
||||||
paramMap["expires_millis"] = *req.ExpiresMillis
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcMessageProduceRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
if req.MediaContent != nil {
|
|
||||||
fileMap["media_content"] = *req.MediaContent
|
|
||||||
}
|
|
||||||
if req.MediaContent2 != nil {
|
|
||||||
fileMap["media_content2"] = *req.MediaContent2
|
|
||||||
}
|
|
||||||
if req.MediaContent3 != nil {
|
|
||||||
fileMap["media_content3"] = *req.MediaContent3
|
|
||||||
}
|
|
||||||
if req.MediaContent5 != nil {
|
|
||||||
fileMap["media_content5"] = *req.MediaContent5
|
|
||||||
}
|
|
||||||
if req.MediaContent4 != nil {
|
|
||||||
fileMap["media_content4"] = *req.MediaContent4
|
|
||||||
}
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
type TaobaoTmcUserCancelRequest struct {
|
|
||||||
/*
|
|
||||||
用户昵称 */
|
|
||||||
Nick *string `json:"nick" required:"true" `
|
|
||||||
/*
|
|
||||||
用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户 defalutValue<EFBFBD><EFBFBD>tbUIC */
|
|
||||||
UserPlatform *string `json:"user_platform,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcUserCancelRequest) SetNick(v string) *TaobaoTmcUserCancelRequest {
|
|
||||||
s.Nick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserCancelRequest) SetUserPlatform(v string) *TaobaoTmcUserCancelRequest {
|
|
||||||
s.UserPlatform = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserCancelRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Nick != nil {
|
|
||||||
paramMap["nick"] = *req.Nick
|
|
||||||
}
|
|
||||||
if req.UserPlatform != nil {
|
|
||||||
paramMap["user_platform"] = *req.UserPlatform
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserCancelRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcUserGetRequest struct {
|
|
||||||
/*
|
|
||||||
需返回的字段列表,多个字段以半角逗号分隔。可选值:TmcUser结构体中的所有字段,一定要返回topic。 */
|
|
||||||
Fields *[]string `json:"fields" required:"true" `
|
|
||||||
/*
|
|
||||||
用户昵称 */
|
|
||||||
Nick *string `json:"nick" required:"true" `
|
|
||||||
/*
|
|
||||||
用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户 defalutValue<EFBFBD><EFBFBD>tbUIC */
|
|
||||||
UserPlatform *string `json:"user_platform,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcUserGetRequest) SetFields(v []string) *TaobaoTmcUserGetRequest {
|
|
||||||
s.Fields = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetRequest) SetNick(v string) *TaobaoTmcUserGetRequest {
|
|
||||||
s.Nick = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
func (s *TaobaoTmcUserGetRequest) SetUserPlatform(v string) *TaobaoTmcUserGetRequest {
|
|
||||||
s.UserPlatform = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserGetRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Fields != nil {
|
|
||||||
paramMap["fields"] = util.ConvertBasicList(*req.Fields)
|
|
||||||
}
|
|
||||||
if req.Nick != nil {
|
|
||||||
paramMap["nick"] = *req.Nick
|
|
||||||
}
|
|
||||||
if req.UserPlatform != nil {
|
|
||||||
paramMap["user_platform"] = *req.UserPlatform
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserGetRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
package request
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaobaoTmcUserPermitRequest struct {
|
|
||||||
/*
|
|
||||||
消息主题列表,用半角逗号分隔。当用户订阅的topic是应用订阅的子集时才需要设置,不设置表示继承应用所订阅的所有topic,一般情况建议不要设置。 */
|
|
||||||
Topics *[]string `json:"topics,omitempty" required:"false" `
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *TaobaoTmcUserPermitRequest) SetTopics(v []string) *TaobaoTmcUserPermitRequest {
|
|
||||||
s.Topics = &v
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserPermitRequest) ToMap() map[string]interface{} {
|
|
||||||
paramMap := make(map[string]interface{})
|
|
||||||
if req.Topics != nil {
|
|
||||||
paramMap["topics"] = util.ConvertBasicList(*req.Topics)
|
|
||||||
}
|
|
||||||
return paramMap
|
|
||||||
}
|
|
||||||
|
|
||||||
func (req *TaobaoTmcUserPermitRequest) ToFileMap() map[string]interface{} {
|
|
||||||
fileMap := make(map[string]interface{})
|
|
||||||
return fileMap
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package response
|
|
||||||
|
|
||||||
import (
|
|
||||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/fliggysdk/defaultability/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AlibabaFliggyCpsCouponIssueResponse struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
System request id
|
|
||||||
*/
|
|
||||||
RequestId string `json:"request_id,omitempty" `
|
|
||||||
|
|
||||||
/*
|
|
||||||
System body
|
|
||||||
*/
|
|
||||||
Body string
|
|
||||||
|
|
||||||
/*
|
|
||||||
返回响应
|
|
||||||
*/
|
|
||||||
Result domain.AlibabaFliggyCpsCouponIssueResult `json:"result,omitempty" `
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user