Compare commits
No commits in common. "master" and "dev_yf" have entirely different histories.
27
index.go
27
index.go
@ -2,9 +2,6 @@ package third_platform_sdk
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
jd_union "repository.lenntc.com/lenntc/third-platform-sdk/platform/jd-union"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/platform/yapingtech"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/platform/zhetaoke"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/platform/zjdg"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/platform/fliggy"
|
||||
@ -50,12 +47,6 @@ const (
|
||||
PlatformMeituan = "meituan"
|
||||
// PlatformZdjg 中捷乐淘-淘宝一分购
|
||||
PlatformZdjg = "zjdg"
|
||||
// PlatformJdUnion 京东联盟
|
||||
PlatformJdUnion = "jd_union"
|
||||
// PlatformZheTaoKe 折淘客
|
||||
PlatformZheTaoKe = "zhetaoke"
|
||||
// PlatformYaPingTech 亚平
|
||||
PlatformYaPingTech = "yapingtech"
|
||||
)
|
||||
|
||||
// PlatformNameMap 平台名称
|
||||
@ -73,9 +64,6 @@ var PlatformNameMap = map[string]string{
|
||||
PlatformYouPiaoPiao: "有票票",
|
||||
PlatformMeituan: "美团联盟",
|
||||
PlatformZdjg: "中捷乐淘-淘宝一分购",
|
||||
PlatformJdUnion: "京东联盟",
|
||||
PlatformZheTaoKe: "折淘客",
|
||||
PlatformYaPingTech: "亚平",
|
||||
}
|
||||
|
||||
// GetPlatformName 获取平台名称
|
||||
@ -147,18 +135,3 @@ func NewMeituanApi(log logx.Logger, conf meituan.AuthConfig) meituan.MeituanApi
|
||||
func NewZjdgApi(log logx.Logger, conf zjdg.AuthConfig) zjdg.ZjdgApi {
|
||||
return zjdg.NewApiClient(log, conf)
|
||||
}
|
||||
|
||||
// NewJdUnion 京东联盟
|
||||
func NewJdUnion(log logx.Logger, conf jd_union.AuthConfig) jd_union.JdUnionApi {
|
||||
return jd_union.NewApiClient(log, conf)
|
||||
}
|
||||
|
||||
// NewZheTaoKe 折淘客
|
||||
func NewZheTaoKe(log logx.Logger, conf zhetaoke.AuthConfig) zhetaoke.ZheTaoKeApi {
|
||||
return zhetaoke.NewApiClient(log, conf)
|
||||
}
|
||||
|
||||
// NewYaPingTech 亚平
|
||||
func NewYaPingTech(log logx.Logger, conf yapingtech.AuthConfig) yapingtech.YaPingTechApi {
|
||||
return yapingtech.NewApiClient(log, conf)
|
||||
}
|
||||
|
||||
@ -2,19 +2,20 @@ package eleme_union
|
||||
|
||||
import (
|
||||
"errors"
|
||||
sdkutil "repository.lenntc.com/lenntc/third-platform-sdk/sdk/dunion-go-sdk/util"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
||||
sdkutil "repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||
)
|
||||
|
||||
// ElemeUnionApi 调用第三方平台的api
|
||||
// Api defines the interface of eleme_union api
|
||||
type ElemeUnionApi interface {
|
||||
// Sign 签名
|
||||
Sign(data map[string]interface{}) string
|
||||
Sign(publicParam PublicParam, data map[string]interface{}) string
|
||||
// KbItemPromotionShareCreate 本地生活媒体创建商品推广链接
|
||||
KbItemPromotionShareCreate(req *request.AlibabaAlscUnionKbItemPromotionShareCreateRequest) (*domain.AlibabaAlscUnionKbItemPromotionShareCreateExtendDTO, error)
|
||||
// ElemePromotionOfficialActivityGet 本地联盟饿了么推广官方活动查询
|
||||
@ -42,8 +43,8 @@ func newElemeUnionApiImpl(log logx.Logger, client *Client) ElemeUnionApi {
|
||||
// Sign 签名
|
||||
// @param publicParam 公共参数
|
||||
// @param data 业务参数
|
||||
func (a *elemeUnionApiImpl) Sign(data map[string]interface{}) string {
|
||||
return sdkutil.GetSign(data, a.client.authConfig.AppSecret)
|
||||
func (a *elemeUnionApiImpl) Sign(publicParam PublicParam, data map[string]interface{}) string {
|
||||
return sdkutil.GetSign(util.StructToMap(publicParam), data, a.client.authConfig.AppSecret)
|
||||
}
|
||||
|
||||
// KbItemPromotionShareCreate 本地生活媒体创建商品推广链接
|
||||
@ -131,7 +132,9 @@ func (a *elemeUnionApiImpl) KbcpxPositiveOrderGet(req *request.AlibabaAlscUnionK
|
||||
}
|
||||
var result []*domain.AlibabaAlscUnionKbcpxPositiveOrderGetOrderDetailReportDTO
|
||||
for _, item := range resp.Result {
|
||||
result = append(result, &item)
|
||||
entity := item
|
||||
entity.BizUnit = req.BizUnit // 将业务类型,手动添加到订单详情数据中
|
||||
result = append(result, &entity)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
@ -3,9 +3,11 @@ package eleme_union
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"testing"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
||||
@ -25,8 +27,8 @@ func TestApiClient(t *testing.T) {
|
||||
func (a *apiClientSuite) SetupSuite() {
|
||||
log := logx.WithContext(context.Background())
|
||||
apiClient := NewApiClient(log, AuthConfig{
|
||||
AppKey: "34632005",
|
||||
AppSecret: "b0e6b6654825e6124f743b2528be95d7",
|
||||
AppKey: "",
|
||||
AppSecret: "",
|
||||
})
|
||||
a.api = apiClient
|
||||
}
|
||||
@ -35,25 +37,25 @@ func (a *apiClientSuite) Test_Sign() {
|
||||
data := map[string]interface{}{
|
||||
"method": "test",
|
||||
}
|
||||
//publicParam := PublicParam{
|
||||
// Method: "taobao.item.seller.get", // 必传 API接口名称,具体参见各平台API接口文档,例:taobao.item.seller.get
|
||||
// AppKey: "34632005", // 必传 TOP分配给应用的AppKey。例:12345678
|
||||
// Session: "", // 可选 用户授权成功后,平台颁发给应用的授权session,详细介绍请点击这里。当此API文档的标签上注明:“需要授权”,则此参数必传;“不需要授权”,则此参数不需要传。
|
||||
// Timestamp: time.Now().Format("2006-01-02 15:04:05"), // 必传 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8,例如:2016-01-01 12:00:00。淘宝API服务端允许客户端请求最大时间误差为10分钟。
|
||||
// V: "2.0", // 必传 API协议版本,可选值:2.0
|
||||
// SignMethod: "md5", // 必传 签名的摘要算法,可选值为:hmac,md5,hmac-sha256。
|
||||
// Format: "json", // 否 返回内容响应格式。不传默认为xml格式,可选值:xml,json。
|
||||
// Simplify: false, // 否 是否采用精简JSON返回格式,仅当format=json时有效,可选值:false,true,不传为false。
|
||||
//}
|
||||
publicParam := PublicParam{
|
||||
Method: "taobao.item.seller.get", // 必传 API接口名称,具体参见各平台API接口文档,例:taobao.item.seller.get
|
||||
AppKey: "34632005", // 必传 TOP分配给应用的AppKey。例:12345678
|
||||
Session: "", // 可选 用户授权成功后,平台颁发给应用的授权session,详细介绍请点击这里。当此API文档的标签上注明:“需要授权”,则此参数必传;“不需要授权”,则此参数不需要传。
|
||||
Timestamp: time.Now().Format("2006-01-02 15:04:05"), // 必传 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8,例如:2016-01-01 12:00:00。淘宝API服务端允许客户端请求最大时间误差为10分钟。
|
||||
V: "2.0", // 必传 API协议版本,可选值:2.0
|
||||
SignMethod: "md5", // 必传 签名的摘要算法,可选值为:hmac,md5,hmac-sha256。
|
||||
Format: "json", // 否 返回内容响应格式。不传默认为xml格式,可选值:xml,json。
|
||||
Simplify: false, // 否 是否采用精简JSON返回格式,仅当format=json时有效,可选值:false,true,不传为false。
|
||||
}
|
||||
|
||||
sign := a.api.Sign(data)
|
||||
sign := a.api.Sign(publicParam, data)
|
||||
a.T().Logf("=====[TestSign] sign: %s", sign)
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) Test_KbItemPromotionShareCreate() {
|
||||
req := &request.AlibabaAlscUnionKbItemPromotionShareCreateRequest{
|
||||
Pid: pointer.String("alsc_23378482_4796002_21291126"),
|
||||
ItemId: pointer.String("10144"),
|
||||
ItemId: pointer.String("10645"),
|
||||
Sid: pointer.String("10001zdt100004"),
|
||||
}
|
||||
resp, err := a.api.KbItemPromotionShareCreate(req)
|
||||
@ -68,7 +70,7 @@ func (a *apiClientSuite) Test_ElemePromotionOfficialActivityGet() {
|
||||
req := &request.AlibabaAlscUnionElemePromotionOfficialactivityGetRequest{
|
||||
QueryRequest: &domain.AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest{
|
||||
Pid: pointer.String("alsc_23378482_4796002_15513017"),
|
||||
ActivityId: pointer.String("12628"),
|
||||
ActivityId: pointer.String("10645"),
|
||||
Sid: pointer.String("10001zdt100004"),
|
||||
},
|
||||
}
|
||||
|
||||
@ -2,10 +2,10 @@ package eleme_union
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||
)
|
||||
|
||||
@ -1,168 +0,0 @@
|
||||
package jd_union
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// JdUnionApi 京东联盟平台
|
||||
type JdUnionApi interface {
|
||||
// Sign 签名
|
||||
Sign(data map[string]interface{}) string
|
||||
// QueryOrderList 查询订单列表
|
||||
QueryOrderList(req QueryOrderListRequest) (*QueryOrderListResponse, error)
|
||||
// PromotionLink 转链
|
||||
PromotionLink(PromotionLinkRequest) (*PromotionLinkResponse, error)
|
||||
}
|
||||
|
||||
type jdUnionApiImpl struct {
|
||||
log logx.Logger
|
||||
client *Client
|
||||
params map[string]any
|
||||
}
|
||||
|
||||
func newJdUnionApiImpl(log logx.Logger, client *Client) JdUnionApi {
|
||||
return &jdUnionApiImpl{
|
||||
log: log,
|
||||
client: client,
|
||||
params: map[string]any{
|
||||
"method": "",
|
||||
"access_token": "",
|
||||
"app_key": client.authConfig.AppKey,
|
||||
"sign_method": SignMethod,
|
||||
"timestamp": time.Now().Format(time.DateTime),
|
||||
"360buy_param_json": "",
|
||||
"v": Version,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (t *jdUnionApiImpl) Sign(data map[string]any) string {
|
||||
// key排序
|
||||
arr := sort.StringSlice{}
|
||||
for k := range data {
|
||||
if k == "sign" {
|
||||
continue
|
||||
}
|
||||
arr = append(arr, k)
|
||||
}
|
||||
arr.Sort()
|
||||
// 参数拼接
|
||||
var build strings.Builder
|
||||
build.WriteString(t.client.authConfig.AppSecret)
|
||||
for _, k := range arr {
|
||||
build.WriteString(fmt.Sprintf("%s%v", k, data[k]))
|
||||
}
|
||||
build.WriteString(t.client.authConfig.AppSecret)
|
||||
return strings.ToUpper(util.Md5String(build.String()))
|
||||
}
|
||||
|
||||
func (t *jdUnionApiImpl) QueryOrderList(req QueryOrderListRequest) (*QueryOrderListResponse, error) {
|
||||
params := make(map[string]any)
|
||||
if req.OrderId != "" {
|
||||
params["orderId"] = req.OrderId
|
||||
} else {
|
||||
params["pageIndex"] = req.PageIndex
|
||||
params["pageSize"] = req.PageSize
|
||||
params["type"] = req.Type
|
||||
params["startTime"] = req.StartTime
|
||||
params["endTime"] = req.EndTime
|
||||
}
|
||||
requestPrams := map[string]any{
|
||||
"orderReq": params,
|
||||
}
|
||||
paramsJson, _ := json.Marshal(requestPrams)
|
||||
|
||||
SystemParams := t.params
|
||||
SystemParams["method"] = QueryOrderListMethod
|
||||
SystemParams["360buy_param_json"] = string(paramsJson)
|
||||
SystemParams["sign"] = t.Sign(SystemParams)
|
||||
|
||||
//values := url.Values{}
|
||||
//for key, value := range SystemParams {
|
||||
// values.Set(key, cast.ToString(value))
|
||||
//}
|
||||
//fmt.Println(fmt.Sprintf("%s?%s", BaseUrl, values.Encode()))
|
||||
|
||||
requestUrl := BaseUrl
|
||||
request := &client.HttpRequest{Headers: t.client.headers, QueryArgs: SystemParams}
|
||||
response := new(JdUnionOpenOrderRowQueryResponse)
|
||||
if err := t.client.HttpPost(requestUrl, request, &client.HttpResponse{Result: response}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if response.ErrorResponse != nil {
|
||||
return nil, fmt.Errorf("京东联盟请求订单接口响应错误,Code[%s],请求ID[%s],错误信息:%s", response.ErrorResponse.Code, response.ErrorResponse.RequestId, response.ErrorResponse.ZhDesc)
|
||||
}
|
||||
if response.JdUnionOpenOrderRowQueryResponse == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if cast.ToInt64(response.JdUnionOpenOrderRowQueryResponse.Code) != 0 {
|
||||
return nil, nil
|
||||
}
|
||||
resp := new(QueryOrderListResponse)
|
||||
err := json.Unmarshal([]byte(response.JdUnionOpenOrderRowQueryResponse.QueryResult), resp)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("京东联盟请求订单接口解析QueryResult失败,错误信息:%s", err.Error())
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// 转链
|
||||
func (t *jdUnionApiImpl) PromotionLink(req PromotionLinkRequest) (*PromotionLinkResponse, error) {
|
||||
params := map[string]any{
|
||||
"materialId": req.MaterialId,
|
||||
"positionId": req.PositionId,
|
||||
"siteId": req.SiteId,
|
||||
}
|
||||
requestPrams := map[string]any{
|
||||
"promotionCodeReq": params,
|
||||
}
|
||||
paramsJson, _ := json.Marshal(requestPrams)
|
||||
|
||||
SystemParams := t.params
|
||||
SystemParams["method"] = PromotionLinkMethod
|
||||
SystemParams["360buy_param_json"] = string(paramsJson)
|
||||
SystemParams["sign"] = t.Sign(SystemParams)
|
||||
|
||||
//values := url.Values{}
|
||||
//for key, value := range SystemParams {
|
||||
// values.Set(key, cast.ToString(value))
|
||||
//}
|
||||
//fmt.Println(fmt.Sprintf("%s?%s", BaseUrl, values.Encode()))
|
||||
|
||||
requestUrl := BaseUrl
|
||||
request := &client.HttpRequest{Headers: t.client.headers, QueryArgs: SystemParams}
|
||||
response := new(JdUnionOpenPromotionCommonGetResponse)
|
||||
if err := t.client.HttpPost(requestUrl, request, &client.HttpResponse{Result: response}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if response.ErrorResponse != nil {
|
||||
return nil, fmt.Errorf("京东联盟请求转链接口响应错误,Code[%s],请求ID[%s],错误信息:%s", response.ErrorResponse.Code, response.ErrorResponse.RequestId, response.ErrorResponse.ZhDesc)
|
||||
}
|
||||
if response.JdUnionOpenPromotionCommonGetResponse == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if cast.ToInt64(response.JdUnionOpenPromotionCommonGetResponse.Code) != 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
resp := new(PromotionLinkResponse)
|
||||
err := json.Unmarshal([]byte(response.JdUnionOpenPromotionCommonGetResponse.GetResult), resp)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("京东联盟请求转链接口解析GetResult失败,错误信息:%s", err.Error())
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
package jd_union
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
// api-单元测试
|
||||
type apiClientSuite struct {
|
||||
suite.Suite
|
||||
api JdUnionApi
|
||||
}
|
||||
|
||||
func TestApiClient(t *testing.T) {
|
||||
suite.Run(t, new(apiClientSuite))
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) SetupSuite() {
|
||||
log := logx.WithContext(context.Background())
|
||||
apiClient := NewApiClient(log, AuthConfig{
|
||||
AppKey: "",
|
||||
AppSecret: "",
|
||||
})
|
||||
a.api = apiClient
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||
data := QueryOrderListRequest{
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Type: 1, //订单时间查询类型(1:下单时间,2:完成时间(购买用户确认收货时间),3:更新时间
|
||||
StartTime: "2025-05-14 17:00:00",
|
||||
EndTime: "2025-05-14 18:00:00",
|
||||
}
|
||||
resp, err := a.api.QueryOrderList(data)
|
||||
if err != nil {
|
||||
a.T().Errorf("=====[Test_QueryOrderList] err: %v", err)
|
||||
}
|
||||
if resp != nil {
|
||||
a.T().Logf("=====[Test_QueryOrderList] resp: %+v, err: %v", resp, err)
|
||||
if len(resp.Data) > 0 {
|
||||
for _, v := range resp.Data {
|
||||
va, _ := json.Marshal(v)
|
||||
fmt.Println(string(va))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) Test_PromotionLink() {
|
||||
data := PromotionLinkRequest{
|
||||
MaterialId: "https://u.jd.com/rDPUXnL",
|
||||
SiteId: "",
|
||||
PositionId: 100030093812,
|
||||
}
|
||||
resp, err := a.api.PromotionLink(data)
|
||||
if err != nil {
|
||||
a.T().Errorf("=====[Test_PromotionLink] err: %v", err)
|
||||
}
|
||||
a.T().Logf("=====[Test_PromotionLink] resp: %+v, err: %v", resp, err)
|
||||
if resp != nil {
|
||||
va, _ := json.Marshal(resp.Data)
|
||||
fmt.Println(string(va))
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package jd_union
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
)
|
||||
|
||||
// AuthConfig api鉴权参数
|
||||
type AuthConfig struct {
|
||||
AppKey string
|
||||
AppSecret string
|
||||
}
|
||||
|
||||
// 连接第三方平台的client
|
||||
type Client struct {
|
||||
log logx.Logger
|
||||
authConfig AuthConfig
|
||||
client.HttpClient
|
||||
headers map[string]string
|
||||
}
|
||||
|
||||
func NewApiClient(log logx.Logger, conf AuthConfig) JdUnionApi {
|
||||
clt := newClient(log, conf)
|
||||
return newJdUnionApiImpl(log, clt)
|
||||
}
|
||||
|
||||
func newClient(log logx.Logger, conf AuthConfig) *Client {
|
||||
return &Client{
|
||||
log: log,
|
||||
authConfig: conf,
|
||||
HttpClient: client.NewHttpClient(log),
|
||||
headers: map[string]string{
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package jd_union
|
||||
|
||||
const (
|
||||
Version = "1.0"
|
||||
Format = "json"
|
||||
JsonParamKey = "360buy_param_json"
|
||||
SignMethod = "md5"
|
||||
|
||||
BaseUrl = "https://api.jd.com/routerjson"
|
||||
QueryOrderListMethod = "jd.union.open.order.row.query"
|
||||
PromotionLinkMethod = "jd.union.open.promotion.common.get"
|
||||
)
|
||||
@ -1,121 +0,0 @@
|
||||
package jd_union
|
||||
|
||||
type QueryOrderListRequest struct {
|
||||
OrderId string `json:"orderId"` //订单号,当orderId不为空时,其他参数非必填
|
||||
PageIndex int64 `json:"pageIndex"` //页码
|
||||
PageSize int64 `json:"pageSize"` //每页包含条数,上限为200
|
||||
Type int64 `json:"type"` //订单时间查询类型(1:下单时间,2:完成时间(购买用户确认收货时间),3:更新时间
|
||||
StartTime string `json:"startTime"` //开始时间 格式yyyy-MM-dd HH:mm:ss,与endTime间隔不超过1小时
|
||||
EndTime string `json:"endTime"` //结束时间 格式yyyy-MM-dd HH:mm:ss,与startTime间隔不超过1小时
|
||||
}
|
||||
type QueryOrderListResponse struct {
|
||||
Code int64 `json:"code"`
|
||||
Data []*QueryOrderListItem `json:"data"`
|
||||
HasMore bool `json:"hasMore"`
|
||||
Message string `json:"message"`
|
||||
RequestId string `json:"requestId"`
|
||||
}
|
||||
type QueryOrderListItem struct {
|
||||
Id string `json:"id"` //标记唯一订单行:订单+sku维度的唯一标识
|
||||
OrderId int64 `json:"orderId"` //订单号
|
||||
ParentId int64 `json:"parentId"` //主单的订单号:如一个订单拆成多个子订单时,原订单号会作为主单号,拆分的订单号为子单号存储在orderid中。若未发生拆单,该字段为0
|
||||
OrderTime string `json:"orderTime"` //下单时间,格式yyyy-MM-dd HH:mm:ss
|
||||
FinishTime string `json:"finishTime"` //完成时间(购买用户确认收货时间),格式yyyy-MM-dd HH:mm:ss
|
||||
ModifyTime string `json:"modifyTime"` //更新时间,格式yyyy-MM-dd HH:mm:ss
|
||||
OrderEmt int64 `json:"orderEmt"` //下单设备 1.pc 2.无线
|
||||
Plus int64 `json:"plus"` //下单用户是否为PLUS会员 0:否,1:是
|
||||
UnionId int64 `json:"unionId"` //推客ID
|
||||
SkuId int64 `json:"skuId"` //商品ID
|
||||
SkuName string `json:"skuName"` //商品名称
|
||||
SkuNum int64 `json:"skuNum"` //商品数量
|
||||
SkuReturnNum int64 `json:"skuReturnNum"` //商品已退货数量
|
||||
SkuFrozenNum int64 `json:"skuFrozenNum"` //商品售后中数量
|
||||
Price float64 `json:"price"` //商品单价
|
||||
CommissionRate float64 `json:"commissionRate"` //佣金比例(投放的广告主计划比例)
|
||||
SubSideRate float64 `json:"subSideRate"` //分成比例(单位:%)
|
||||
SubsidyRate float64 `json:"subsidyRate"` //补贴比例(单位:%)
|
||||
FinalRate float64 `json:"finalRate"` //最终分佣比例(单位:%)=分成比例+补贴比例
|
||||
EstimateCosPrice float64 `json:"estimateCosPrice"` //预估计佣金额
|
||||
EstimateFee float64 `json:"estimateFee"` //推客的预估佣金
|
||||
ActualCosPrice float64 `json:"actualCosPrice"` //实际计算佣金的金额
|
||||
ActualFee float64 `json:"actualFee"` //推客分得的实际佣金
|
||||
ValidCode int64 `json:"validCode"` //sku维度的有效码/状态((-1:未知,2.无效-拆单,3.无效-取消,4.无效-京东帮帮主订单,5.无效-账号异常,6.无效-赠品类目不返佣,7.无效-校园订单,8.无效-企业订单,9.无效-团购订单,11.无效-乡村推广员下单,13. 违规订单-其他,14.无效-来源与备案网址不符,15.待付款,16.已付款,17.已完成(购买用户确认收货),19.无效-佣金比例为0,20.无效-此复购订单对应的首购订单无效,21.无效-云店订单,22.无效-PLUS会员佣金比例为0,23.无效-支付有礼,24.已付定金,25. 违规订单-流量劫持,26. 违规订单-流量异常,27. 违规订单-违反京东平台规则,28. 违规订单-多笔交易异常,29.无效-跨屏跨店,30.无效-累计件数超出类目上限,31.无效-黑名单sku,33.超市卡充值订单,34.无效-推卡订单无效)
|
||||
PositionId int64 `json:"positionId"` //推广位ID
|
||||
SiteId int64 `json:"siteId"` //应用id(网站id、appid、社交媒体id、流量媒体id)
|
||||
Pid string `json:"pid"` //格式:子推客ID_子站长应用ID_子推客推广位ID
|
||||
SubUnionId string `json:"subUnionId"` //子渠道标识,在转链时可自定义传入,格式要求:字母、数字或下划线,最多支持80个字符(需要联系运营开放白名单才能拿到数据)
|
||||
PayMonth int64 `json:"payMonth"` //预估结算时间,订单完成后才会返回,格式:yyyyMMdd,默认:0
|
||||
//BalanceExt string `json:"balanceExt"` //下面的数据暂时用不到
|
||||
//CategoryInfo struct {
|
||||
// Cid1 int64 `json:"cid1"`
|
||||
// Cid2 int64 `json:"cid2"`
|
||||
// Cid3 int64 `json:"cid3"`
|
||||
//} `json:"categoryInfo"`
|
||||
//ChannelId int64 `json:"channelId"`
|
||||
//Cid1 int64 `json:"cid1"`
|
||||
//Cid2 int64 `json:"cid2"`
|
||||
//Cid3 int64 `json:"cid3"`
|
||||
//CpActId int64 `json:"cpActId"`
|
||||
//ExpressStatus int64 `json:"expressStatus"`
|
||||
//Ext1 string `json:"ext1"`
|
||||
//GiftCouponKey string `json:"giftCouponKey"`
|
||||
//GiftCouponOcsAmount int64 `json:"giftCouponOcsAmount"`
|
||||
//GoodsInfo struct {
|
||||
// MainSkuId int64 `json:"mainSkuId"`
|
||||
// ProductId int64 `json:"productId"`
|
||||
// ShopId int64 `json:"shopId"`
|
||||
//} `json:"goodsInfo"`
|
||||
//ItemId string `json:"itemId"`
|
||||
//OrderTag string `json:"orderTag"`
|
||||
//PopId int64 `json:"popId"`
|
||||
//ProPriceAmount int64 `json:"proPriceAmount"`
|
||||
//Rid int64 `json:"rid"`
|
||||
//SkuTag string `json:"skuTag"`
|
||||
//TraceType int64 `json:"traceType"`
|
||||
//UnionAlias string `json:"unionAlias"`
|
||||
//UnionRole int64 `json:"unionRole"`
|
||||
//UnionTag string `json:"unionTag"`
|
||||
}
|
||||
type JdUnionOpenOrderRowQueryResponse struct {
|
||||
JdUnionOpenOrderRowQueryResponse *JdUnionOpenOrderRowQuery `json:"jd_union_open_order_row_query_responce"`
|
||||
ErrorResponse *ErrorResponse `json:"error_response"`
|
||||
}
|
||||
type JdUnionOpenOrderRowQuery struct {
|
||||
Code string `json:"code"`
|
||||
QueryResult string `json:"queryResult"`
|
||||
}
|
||||
type ErrorResponse struct {
|
||||
Code string `json:"code"`
|
||||
ZhDesc string `json:"zh_desc"`
|
||||
EnDesc string `json:"en_desc"`
|
||||
RequestId string `json:"request_id"`
|
||||
}
|
||||
|
||||
// 转链
|
||||
type PromotionLinkRequest struct {
|
||||
MaterialId string `json:"materialId"` //推广物料url,例如活动链接、商品链接等;支持仅传入skuid
|
||||
SiteId string `json:"siteId"` //网站ID/媒体ID
|
||||
PositionId int64 `json:"positionId"` //自定义推广位id,自定义的数字,自己在本地跟用户做好关联,订单中会透出自定义的数字
|
||||
SubUnionId string `json:"subUnionId"` //子渠道标识 暂时没用 需要申请权限
|
||||
ChainType int64 `json:"chainType"` // 转链类型,1:长链, 2 :短链 ,3: 长链+短链,默认短链,短链有效期60天
|
||||
}
|
||||
|
||||
type PromotionLinkResponse struct {
|
||||
Code int64 `json:"code"` //200为成功,其他失败
|
||||
Data *PromotionLink `json:"data"`
|
||||
Message string `json:"message"`
|
||||
RequestId string `json:"request_id"`
|
||||
}
|
||||
type PromotionLink struct {
|
||||
ShortURL string `json:"shortUrl"` //短链
|
||||
ClickURL string `json:"clickUrl"` //长链接
|
||||
JCommand string `json:"jCommand"` //口令
|
||||
}
|
||||
type JdUnionOpenPromotionCommonGetResponse struct {
|
||||
JdUnionOpenPromotionCommonGetResponse *JdUnionOpenPromotionCommonGet `json:"jd_union_open_promotion_common_get_responce"`
|
||||
ErrorResponse *ErrorResponse `json:"error_response"`
|
||||
}
|
||||
type JdUnionOpenPromotionCommonGet struct {
|
||||
Code string `json:"code"`
|
||||
GetResult string `json:"getResult"`
|
||||
}
|
||||
@ -55,79 +55,46 @@ func (a *jutuikeApiImpl) GenerateLink(ctx context.Context, req GenerateLinkReque
|
||||
}
|
||||
result := new(GenerateLinkData)
|
||||
data := cast.ToStringMap(response.Data)
|
||||
if actName, ok := data["act_name"]; ok {
|
||||
if actName != nil {
|
||||
result.ActName = cast.ToString(actName)
|
||||
if _, ok := data["act_name"]; ok {
|
||||
result.ActName = data["act_name"].(string)
|
||||
}
|
||||
if _, ok := data["poster_qrcode_url"]; ok {
|
||||
result.PosterQrcodeUrl = data["poster_qrcode_url"].(string)
|
||||
}
|
||||
if posterQrcodeUrl, ok := data["poster_qrcode_url"]; ok {
|
||||
if posterQrcodeUrl != nil {
|
||||
result.PosterQrcodeUrl = cast.ToString(posterQrcodeUrl)
|
||||
if _, ok := data["h5"]; ok {
|
||||
result.H5 = data["h5"].(string)
|
||||
}
|
||||
if _, ok := data["long_h5"]; ok {
|
||||
result.LongH5 = data["long_h5"].(string)
|
||||
}
|
||||
if taoBaoPoster, ok := data["taobao_poster_qrcode_url"]; ok {
|
||||
if result.PosterQrcodeUrl == "" {
|
||||
result.PosterQrcodeUrl = cast.ToString(taoBaoPoster)
|
||||
if _, ok := data["h5_evoke"]; ok {
|
||||
result.H5Evoke = data["h5_evoke"].(string)
|
||||
}
|
||||
}
|
||||
if tkl, ok := data["tkl"]; ok {
|
||||
result.Tkl = cast.ToString(tkl)
|
||||
}
|
||||
|
||||
if h5Url, ok := data["h5"]; ok {
|
||||
if h5Url != nil {
|
||||
result.H5 = cast.ToString(h5Url)
|
||||
}
|
||||
}
|
||||
if longH5, ok := data["long_h5"]; ok {
|
||||
if longH5 != nil {
|
||||
result.LongH5 = cast.ToString(longH5)
|
||||
}
|
||||
}
|
||||
if h5Evoke, ok := data["h5_evoke"]; ok {
|
||||
if h5Evoke != nil {
|
||||
result.H5Evoke = cast.ToString(h5Evoke)
|
||||
}
|
||||
}
|
||||
if deepLink, ok := data["deeplink"]; ok {
|
||||
if deepLink != nil {
|
||||
result.DeepLink = cast.ToString(deepLink)
|
||||
}
|
||||
|
||||
if _, ok := data["deeplink"]; ok {
|
||||
result.DeepLink = data["deeplink"].(string)
|
||||
}
|
||||
if _, ok := data["we_app_info"]; ok {
|
||||
weApp := cast.ToStringMap(data["we_app_info"])
|
||||
weAppInfoTemp := new(WeAppInfo)
|
||||
if weAppAppId, tok := weApp["app_id"]; tok {
|
||||
if weAppAppId != nil {
|
||||
weAppInfoTemp.AppId = cast.ToString(weAppAppId)
|
||||
if _, tok := weApp["app_id"]; tok {
|
||||
weAppInfoTemp.AppId = weApp["app_id"].(string)
|
||||
}
|
||||
if _, tok := weApp["page_path"]; tok {
|
||||
weAppInfoTemp.PagePath = weApp["page_path"].(string)
|
||||
}
|
||||
if weAppPagePath, tok := weApp["page_path"]; tok {
|
||||
if weAppPagePath != nil {
|
||||
weAppInfoTemp.PagePath = cast.ToString(weAppPagePath)
|
||||
}
|
||||
|
||||
}
|
||||
if weAppMiniCode, tok := weApp["miniCode"]; tok {
|
||||
if weAppMiniCode != nil {
|
||||
weAppInfoTemp.MiniCode = cast.ToString(weAppMiniCode)
|
||||
}
|
||||
if _, tok := weApp["miniCode"]; tok {
|
||||
weAppInfoTemp.MiniCode = weApp["miniCode"].(string)
|
||||
}
|
||||
result.WeAppInfo = weAppInfoTemp
|
||||
}
|
||||
if _, ok := data["alipay_app_info"]; ok {
|
||||
alipayApp := cast.ToStringMap(data["alipay_app_info"])
|
||||
alipayAppInfoTemp := new(AlipayAppInfo)
|
||||
if alipayAppAppid, tok := alipayApp["app_id"]; tok {
|
||||
if alipayAppAppid != nil {
|
||||
alipayAppInfoTemp.AppId = cast.ToString(alipayAppAppid)
|
||||
}
|
||||
}
|
||||
if alipayAppPagePath, tok := alipayApp["page_path"]; tok {
|
||||
if alipayAppPagePath != nil {
|
||||
alipayAppInfoTemp.PagePath = cast.ToString(alipayAppPagePath)
|
||||
if _, tok := alipayApp["app_id"]; tok {
|
||||
alipayAppInfoTemp.AppId = alipayApp["app_id"].(string)
|
||||
}
|
||||
if _, tok := alipayApp["page_path"]; tok {
|
||||
alipayAppInfoTemp.PagePath = alipayApp["page_path"].(string)
|
||||
}
|
||||
result.AlipayAppInfo = alipayAppInfoTemp
|
||||
}
|
||||
|
||||
@ -28,8 +28,8 @@ func (a *apiClientSuite) SetupSuite() {
|
||||
|
||||
func (a *apiClientSuite) Test_GenerateLink() {
|
||||
req := GenerateLinkRequest{
|
||||
ActId: 60,
|
||||
Sid: "10001zdt100034",
|
||||
ActId: 65,
|
||||
Sid: "f3a8c1",
|
||||
}
|
||||
result, err := a.api.GenerateLink(context.Background(), req)
|
||||
if !a.NoError(err) {
|
||||
|
||||
@ -20,7 +20,6 @@ type GenerateLinkData struct {
|
||||
LongH5 string `json:"long_h5"` // 推广长链接(部分活动没有,请注意判断)
|
||||
H5Evoke string `json:"h5_evoke"`
|
||||
DeepLink string `json:"deeplink"`
|
||||
Tkl string `json:"tkl"`
|
||||
WeAppInfo *WeAppInfo `json:"we_app_info"` // 微信小程序信息(部分活动没有,请注意判断)
|
||||
AlipayAppInfo *AlipayAppInfo `json:"alipay_app_info"` //支付宝小程序信息(部分活动没有,请注意判断)
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ func TestApiClient(t *testing.T) {
|
||||
func (a *apiClientSuite) SetupSuite() {
|
||||
log := logx.WithContext(context.Background())
|
||||
apiClient := NewApiClient(log, AuthConfig{
|
||||
AppKey: "edf37a6019e045aeaec646220e4bd369",
|
||||
AppKey: "",
|
||||
AppSecret: "",
|
||||
})
|
||||
a.api = apiClient
|
||||
@ -39,9 +39,8 @@ func (a *apiClientSuite) Test_Sign() {
|
||||
|
||||
func (a *apiClientSuite) Test_GenerateLink() {
|
||||
req := GenerateLinkRequest{
|
||||
LinkType: 5,
|
||||
LinkTypeList: []int32{4, 5},
|
||||
ActId: "529",
|
||||
LinkType: 1,
|
||||
ActId: "7",
|
||||
Sid: "f3a8c1",
|
||||
}
|
||||
result, err := a.api.GenerateLink(context.Background(), req)
|
||||
|
||||
@ -3,7 +3,6 @@ package meituan_media
|
||||
// GenerateLinkRequest 生成推广链接请求
|
||||
type GenerateLinkRequest struct {
|
||||
LinkType int32 `json:"linkType"` // 必填 链接类型,枚举值:1 H5长链接;2 H5短链接;3 deeplink(唤起)链接;4 微信小程序唤起路径
|
||||
LinkTypeList []int32 `json:"linkTypeList"` // 必填 链接类型,枚举值:1 H5长链接;2 H5短链接;3 deeplink(唤起)链接;4 微信小程序唤起路径
|
||||
Platform int32 `json:"platform,omitempty"` // 非必填 商品所属业务一级分类类型;请求的商品推广链接所属的业务类型信息,即只有输入skuViewId时才需要传本字段:1 到家及其他业务类型,2 到店业务类型;不填则默认1
|
||||
BizLine int32 `json:"bizLine,omitempty"` // 非必填 商品所属业务二级分类类型;请求的商品推广链接所属的业务类型信息,即只有输入skuViewId时才需要传本字段;当字段platform为1,选择到家及其他业务类型时:5 医药,不填则默认null,表示外卖商品券;当字段platform为2,选择到店业务类型时:1 到餐,2 到综 3:酒店 4:门票 不填则默认1
|
||||
ActId string `json:"actId,omitempty"` // 非必填 活动物料ID,我要推广-活动推广中第一列的id信息(和商品id、活动链接三选一填写,不能全填)
|
||||
@ -18,7 +17,6 @@ type GenerateLinkResponse struct {
|
||||
Message string `json:"message"` // 响应文案
|
||||
Data string `json:"data"` // 返回对应的推广链接,这里的链接才能实现跟单计佣
|
||||
SkuViewId string `json:"skuViewId"` // 若用text进行入参取链,且返回的推广链接为商品券链接,则返回对应商品的展示ID,可以根据该ID查商品券接口获取对应的展示信息和佣金信息
|
||||
ReferralLinkMap map[string]string `json:"referralLinkMap"` //多链接类型结果映射,对应入参linkTypeList中的各个有效链接类型(key:链接类型, value:推广链接)
|
||||
}
|
||||
|
||||
// QueryOrderListRequest 查询订单列表请求
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
package yapingtech
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
)
|
||||
|
||||
// YaPingTechApi 亚平平台
|
||||
type YaPingTechApi interface {
|
||||
QueryOrderList(ctx context.Context, req QueryOrderListRequest) ([]*QueryOrderListItem, error)
|
||||
}
|
||||
type yaPingTechApiImpl struct {
|
||||
log logx.Logger
|
||||
client *Client
|
||||
}
|
||||
|
||||
func newYaPingTechApiImpl(log logx.Logger, client *Client) YaPingTechApi {
|
||||
return &yaPingTechApiImpl{
|
||||
log: log,
|
||||
client: client,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *yaPingTechApiImpl) QueryOrderList(ctx context.Context, req QueryOrderListRequest) ([]*QueryOrderListItem, error) {
|
||||
params := map[string]any{
|
||||
"page": req.Page,
|
||||
"out_order_sn": req.OutOrderSn,
|
||||
}
|
||||
if req.Type != "" {
|
||||
params["type"] = req.Type
|
||||
}
|
||||
//加密参数
|
||||
paramsStr, _ := json.Marshal(params)
|
||||
jsonData, err := Encrypt(string(paramsStr), s.client.authConfig.AppSecret)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("yapingtech encrypt failed: %v", err)
|
||||
}
|
||||
args := map[string]any{
|
||||
"app_id": s.client.authConfig.AppId,
|
||||
"json_data": jsonData,
|
||||
}
|
||||
request := &client.HttpRequest{Headers: s.client.headers, BodyArgs: args}
|
||||
response := new(QueryOrderListResponse)
|
||||
if err := s.client.HttpPost(GetOrderListUrl, request, &client.HttpResponse{Result: response}); err != nil {
|
||||
return nil, fmt.Errorf("yapingtech http post failed: %v", err)
|
||||
}
|
||||
if response.Code != 200 {
|
||||
return nil, fmt.Errorf(response.Message)
|
||||
}
|
||||
return response.Data.Items, nil
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
package yapingtech
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// api-单元测试
|
||||
type apiClientSuite struct {
|
||||
suite.Suite
|
||||
api YaPingTechApi
|
||||
}
|
||||
|
||||
func TestApiClient(t *testing.T) {
|
||||
suite.Run(t, new(apiClientSuite))
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) SetupSuite() {
|
||||
log := logx.WithContext(context.Background())
|
||||
apiClient := NewApiClient(log, AuthConfig{
|
||||
AppId: "ov595MzFifkk1usgIx3+3Q==",
|
||||
AppSecret: "8/3eQzZbj9ymbC80MHm1EgcMZ1wUI2wOrxjwx4dfiekG/u+wvW3lqz6PKnzYQ0Hs",
|
||||
})
|
||||
a.api = apiClient
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||
req := QueryOrderListRequest{
|
||||
Page: 1,
|
||||
OutOrderSn: "Y02141445536174133",
|
||||
}
|
||||
result, err := a.api.QueryOrderList(context.Background(), req)
|
||||
if !a.NoError(err) {
|
||||
a.T().Errorf("========[Test_QueryOrderList] response error:%s", err)
|
||||
return
|
||||
}
|
||||
resultByte, err := json.Marshal(result)
|
||||
if err != nil {
|
||||
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
||||
return
|
||||
}
|
||||
a.T().Logf("================[Test_QueryOrderList] result: %s", string(resultByte))
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
package yapingtech
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
)
|
||||
|
||||
// AuthConfig api鉴权参数
|
||||
type AuthConfig struct {
|
||||
AppId string // api id
|
||||
AppSecret string // api secret
|
||||
}
|
||||
|
||||
// Client 连接第三方平台的client
|
||||
type Client struct {
|
||||
log logx.Logger
|
||||
authConfig AuthConfig
|
||||
client.HttpClient
|
||||
headers map[string]string
|
||||
}
|
||||
|
||||
func NewApiClient(log logx.Logger, conf AuthConfig) YaPingTechApi {
|
||||
clt := newClient(log, conf)
|
||||
return newYaPingTechApiImpl(log, clt)
|
||||
}
|
||||
|
||||
func newClient(log logx.Logger, conf AuthConfig) *Client {
|
||||
return &Client{
|
||||
log: log,
|
||||
authConfig: conf,
|
||||
HttpClient: client.NewHttpClient(log),
|
||||
headers: map[string]string{
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
package yapingtech
|
||||
|
||||
const (
|
||||
ApiDomain = "https://api.haokavip.com" // 正式接口域名
|
||||
ApiTestDomain = "https://mp-api.66-six.com" // 测试接口域名
|
||||
|
||||
GetOrderListUrl = ApiDomain + "/open/api/list_order"
|
||||
)
|
||||
@ -1,58 +0,0 @@
|
||||
package yapingtech
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
// PKCS7Padding pads the input text according to the PKCS7 standard.
|
||||
func PKCS7Padding(data []byte, blockSize int) []byte {
|
||||
padding := blockSize - len(data)%blockSize
|
||||
padText := bytes.Repeat([]byte{byte(padding)}, padding)
|
||||
return append(data, padText...)
|
||||
}
|
||||
|
||||
// Encrypt encrypts the given plaintext using AES-256-ECB.
|
||||
func Encrypt(plaintext, key string) (string, error) {
|
||||
// Truncate the key to 32 bytes
|
||||
truncatedKey := []byte(key)[:32]
|
||||
block, err := aes.NewCipher(truncatedKey)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
paddedText := PKCS7Padding([]byte(plaintext), aes.BlockSize)
|
||||
cipherText := make([]byte, len(paddedText))
|
||||
mode := NewECBEncrypter(block)
|
||||
mode.CryptBlocks(cipherText, paddedText)
|
||||
return base64.StdEncoding.EncodeToString(cipherText), nil
|
||||
}
|
||||
|
||||
// ecbEncrypter is a custom implementation of ECB encryption mode.
|
||||
type ecbEncrypter struct {
|
||||
b cipher.Block
|
||||
blockSize int
|
||||
}
|
||||
|
||||
func NewECBEncrypter(b cipher.Block) cipher.BlockMode {
|
||||
return &ecbEncrypter{
|
||||
b: b,
|
||||
blockSize: b.BlockSize(),
|
||||
}
|
||||
}
|
||||
func (x *ecbEncrypter) BlockSize() int { return x.blockSize }
|
||||
|
||||
func (x *ecbEncrypter) CryptBlocks(dst, src []byte) {
|
||||
if len(src)%x.blockSize != 0 {
|
||||
panic("crypto/cipher: input not full blocks")
|
||||
}
|
||||
if len(dst) < len(src) {
|
||||
panic("crypto/cipher: output smaller than input")
|
||||
}
|
||||
for len(src) > 0 {
|
||||
x.b.Encrypt(dst, src[:x.blockSize])
|
||||
src = src[x.blockSize:]
|
||||
dst = dst[x.blockSize:]
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package yapingtech
|
||||
|
||||
type QueryOrderListRequest struct {
|
||||
Page int64 `json:"page"` // 分页
|
||||
OutOrderSn string `json:"out_order_sn"` //传入亚平科技的订单ID,多个订单号可以使用逗号【,】最大20个订单号。请求会有频次限制,每1秒最多5次,超过之后会禁止访问1小时
|
||||
Type string `json:"type"` //查询下级合伙人订单,proxy
|
||||
}
|
||||
|
||||
type QueryOrderListResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message"`
|
||||
Code int64 `json:"code"`
|
||||
Data struct {
|
||||
Items []*QueryOrderListItem `json:"items"`
|
||||
PageInfo struct {
|
||||
Total int64 `json:"total"`
|
||||
CurrentPage int64 `json:"currentPage"`
|
||||
TotalPage int64 `json:"totalPage"`
|
||||
} `json:"pageInfo"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type QueryOrderListItem struct {
|
||||
OrderSn string `json:"order_sn"` //自己的ID
|
||||
OutOrderSn string `json:"out_order_sn"` //亚平科技订单ID
|
||||
Number string `json:"number"` //开卡号码
|
||||
Status int64 `json:"status"` //订单状态,1为开卡中,2为已发货,3为已充值,4为失败
|
||||
StatusText string `json:"status_text"` //订单状态描述
|
||||
IsActivated int64 `json:"is_activated"` //是否激活 1为激活,0为未激活
|
||||
ActivatedAt string `json:"activated_at"` //激活时间
|
||||
IsRecharged int64 `json:"is_recharged"` //是否首充 1为首充,0为未首充
|
||||
RechargedAt string `json:"recharged_at"` //首充时间 yyyy-mm-dd hh-mm-ss
|
||||
RechargedAmount int64 `json:"recharged_amount"` //充值金额
|
||||
ExpressName string `json:"express_name"` //物流公司
|
||||
ExpressSn string `json:"express_sn"` //物流单号
|
||||
Reason string `json:"reason"` //失败原因/生产备注
|
||||
ProductName string `json:"product_name"` //产品名称
|
||||
ProductId int64 `json:"product_id"` //产品ID
|
||||
UpdateTime string `json:"update_time"` //订单更新时间
|
||||
CreateTime string `json:"create_time"` //订单创建时间
|
||||
Name string `json:"name"` //开卡人姓名
|
||||
IdCard string `json:"id_card"` //开发人身份证号
|
||||
Phone string `json:"phone"` //开卡人电话
|
||||
Province string `json:"province"` //省
|
||||
City string `json:"city"` //市
|
||||
District string `json:"district"` //区
|
||||
Address string `json:"address"` //完整地址
|
||||
Channel string `json:"channel"` //渠道 sid
|
||||
ShortUrl string `json:"short_url"` //上传三证链接
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package zhetaoke
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
)
|
||||
|
||||
// ZheTaoKeApi 折淘客
|
||||
type ZheTaoKeApi interface {
|
||||
// PromotionLink 转链
|
||||
PromotionLink(PromotionLinkRequest) (*PromotionLinkResponse, error)
|
||||
}
|
||||
|
||||
type zheTaoKeApiImpl struct {
|
||||
log logx.Logger
|
||||
client *Client
|
||||
}
|
||||
|
||||
func newZheTaoKeApiImpl(log logx.Logger, client *Client) ZheTaoKeApi {
|
||||
return &zheTaoKeApiImpl{
|
||||
log: log,
|
||||
client: client,
|
||||
}
|
||||
}
|
||||
|
||||
// 转链
|
||||
func (z *zheTaoKeApiImpl) PromotionLink(req PromotionLinkRequest) (*PromotionLinkResponse, error) {
|
||||
params := map[string]any{
|
||||
"appkey": z.client.authConfig.AppKey,
|
||||
"unionId": z.client.authConfig.UnionId,
|
||||
"materialId": req.MaterialId,
|
||||
"chainType": req.ChainType,
|
||||
"positionId": req.PositionId,
|
||||
}
|
||||
|
||||
request := &client.HttpRequest{Headers: z.client.headers, QueryArgs: params}
|
||||
response := new(JdUnionOpenPromotionByunionidGetResponse)
|
||||
if err := z.client.HttpPost(PromotionLinkUrl, request, &client.HttpResponse{Result: response}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if response.Content != "" {
|
||||
return nil, fmt.Errorf("折淘客-京东联盟 转链接口失败:[%d]%s", response.Status, response.Content)
|
||||
}
|
||||
if response.JdUnionOpenPromotionByunionidGetResponse == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if response.JdUnionOpenPromotionByunionidGetResponse.Result == "" {
|
||||
return nil, nil
|
||||
}
|
||||
resp := new(PromotionLinkResponse)
|
||||
err := json.Unmarshal([]byte(response.JdUnionOpenPromotionByunionidGetResponse.Result), &resp)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("折淘客-京东联盟 转链接口响应结果解析失败,错误信息:%s", err.Error())
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package zhetaoke
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
// api-单元测试
|
||||
type apiClientSuite struct {
|
||||
suite.Suite
|
||||
api ZheTaoKeApi
|
||||
}
|
||||
|
||||
func TestApiClient(t *testing.T) {
|
||||
suite.Run(t, new(apiClientSuite))
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) SetupSuite() {
|
||||
log := logx.WithContext(context.Background())
|
||||
apiClient := NewApiClient(log, AuthConfig{
|
||||
AppKey: "de6307e7af054f69bd2506696d96e47d",
|
||||
UnionId: "2036695914",
|
||||
})
|
||||
a.api = apiClient
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) Test_PromotionLink() {
|
||||
data := PromotionLinkRequest{
|
||||
MaterialId: "https://u.jd.com/rGc3TeA", //推广物料url,例如活动链接、商品链接等;支持仅传入skuid
|
||||
PositionId: 10001100040, //自定义推广位id,自定义的数字,自己在本地跟用户做好关联,订单中会透出自定义的数字
|
||||
ChainType: 3, // 转链类型,1:长链, 2 :短链 ,3: 长链+短链,默认短链,短链有效期60天
|
||||
}
|
||||
resp, err := a.api.PromotionLink(data)
|
||||
if err != nil {
|
||||
a.T().Errorf("=====[Test_PromotionLink] err: %v", err)
|
||||
}
|
||||
a.T().Logf("=====[Test_PromotionLink] resp: %+v, err: %v", resp, err)
|
||||
if resp != nil {
|
||||
va, _ := json.Marshal(resp.Data)
|
||||
fmt.Println(string(va))
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package zhetaoke
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
)
|
||||
|
||||
// AuthConfig api鉴权参数
|
||||
type AuthConfig struct {
|
||||
UnionId string
|
||||
AppKey string
|
||||
}
|
||||
|
||||
// 连接第三方平台的client
|
||||
type Client struct {
|
||||
log logx.Logger
|
||||
authConfig AuthConfig
|
||||
client.HttpClient
|
||||
headers map[string]string
|
||||
}
|
||||
|
||||
func NewApiClient(log logx.Logger, conf AuthConfig) ZheTaoKeApi {
|
||||
clt := newClient(log, conf)
|
||||
return newZheTaoKeApiImpl(log, clt)
|
||||
}
|
||||
|
||||
func newClient(log logx.Logger, conf AuthConfig) *Client {
|
||||
return &Client{
|
||||
log: log,
|
||||
authConfig: conf,
|
||||
HttpClient: client.NewHttpClient(log),
|
||||
headers: map[string]string{
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package zhetaoke
|
||||
|
||||
const (
|
||||
PromotionLinkUrl = "http://api.zhetaoke.com:20000/api/open_jing_union_open_promotion_byunionid_get.ashx"
|
||||
)
|
||||
@ -1,30 +0,0 @@
|
||||
package zhetaoke
|
||||
|
||||
type PromotionLinkRequest struct {
|
||||
MaterialId string `json:"materialId"` //推广物料url,例如活动链接、商品链接等;支持仅传入skuid
|
||||
PositionId int64 `json:"positionId"` //自定义推广位id,自定义的数字,自己在本地跟用户做好关联,订单中会透出自定义的数字
|
||||
SubUnionId string `json:"subUnionId"` //子渠道标识 暂时没用 需要申请权限
|
||||
ChainType int64 `json:"chainType"` // 转链类型,1:长链, 2 :短链 ,3: 长链+短链,默认短链,短链有效期60天
|
||||
}
|
||||
|
||||
type PromotionLinkResponse struct {
|
||||
Code int64 `json:"code"` //200为成功,其他失败
|
||||
Data *PromotionLink `json:"data"`
|
||||
Message string `json:"message"`
|
||||
RequestId string `json:"request_id"`
|
||||
}
|
||||
type PromotionLink struct {
|
||||
ShortURL string `json:"shortUrl"` //短链
|
||||
ClickURL string `json:"clickUrl"` //长链接
|
||||
JCommand string `json:"jCommand"` //口令
|
||||
}
|
||||
type JdUnionOpenPromotionByunionidGetResponse struct {
|
||||
JdUnionOpenPromotionByunionidGetResponse *JdUnionOpenPromotionByunionidGet `json:"jd_union_open_promotion_byunionid_get_response"`
|
||||
Status int64 `json:"status"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type JdUnionOpenPromotionByunionidGet struct {
|
||||
Code string `json:"code"`
|
||||
Result string `json:"result"`
|
||||
}
|
||||
@ -1,11 +1,8 @@
|
||||
package zjdg
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"net/url"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/client"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/util"
|
||||
)
|
||||
@ -13,9 +10,7 @@ import (
|
||||
// ZjdgApi 中捷乐淘-淘宝一分购
|
||||
type ZjdgApi interface {
|
||||
// ZoneAdd 获取推广编号-创建
|
||||
ZoneAdd(ctx context.Context, req ZoneAddRequest) (*ZoneAddResponse, error)
|
||||
// GenerateH5Url 生成H5链接
|
||||
GenerateH5Url(ctx context.Context, req GenerateH5UrlRequest) (string, error)
|
||||
ZoneAdd(req *ZoneAddRequest) (*ZoneAddResponse, error)
|
||||
}
|
||||
type zjdgApiImpl struct {
|
||||
log logx.Logger
|
||||
@ -30,7 +25,7 @@ func newZjdgApiImpl(log logx.Logger, client *Client) ZjdgApi {
|
||||
}
|
||||
|
||||
// ZoneAdd 获取推广编号
|
||||
func (a *zjdgApiImpl) ZoneAdd(ctx context.Context, req ZoneAddRequest) (*ZoneAddResponse, error) {
|
||||
func (a *zjdgApiImpl) ZoneAdd(req *ZoneAddRequest) (*ZoneAddResponse, error) {
|
||||
// 响应示例 {"code":0,"message":"获取成功","data":"1963667","token_id":""}
|
||||
zoneAddUrl := fmt.Sprintf("%s%s", ZoneAddUrl, a.client.authConfig.UserId)
|
||||
args := util.StructToMap(req)
|
||||
@ -46,28 +41,3 @@ func (a *zjdgApiImpl) ZoneAdd(ctx context.Context, req ZoneAddRequest) (*ZoneAdd
|
||||
AdZoneId: response.Data,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (a *zjdgApiImpl) GenerateH5Url(ctx context.Context, req GenerateH5UrlRequest) (string, error) {
|
||||
u, err := url.Parse(req.ActivityUrl)
|
||||
if err != nil {
|
||||
return "", errors.New("activityUrl不是一个url")
|
||||
}
|
||||
urlParams := u.Query()
|
||||
for key, item := range urlParams {
|
||||
if key == "adzoneid" {
|
||||
urlParams.Set("adzoneid", req.Sid)
|
||||
} else if key == "userid" {
|
||||
urlParams.Set("userid", a.client.authConfig.UserId)
|
||||
} else {
|
||||
if len(item) > 0 {
|
||||
urlParams.Set(key, item[0])
|
||||
} else {
|
||||
urlParams.Set(key, "")
|
||||
}
|
||||
}
|
||||
fmt.Println(fmt.Sprintf("key=%s,val=%s,len=%d", key, item, len(item)))
|
||||
}
|
||||
u.RawQuery = urlParams.Encode()
|
||||
|
||||
return u.String(), nil
|
||||
}
|
||||
|
||||
@ -28,29 +28,15 @@ func (a *apiClientSuite) SetupSuite() {
|
||||
|
||||
func (a *apiClientSuite) Test_ZoneAdd() {
|
||||
req := ZoneAddRequest{}
|
||||
result, err := a.api.ZoneAdd(context.Background(), req)
|
||||
result, err := a.api.ZoneAdd(&req)
|
||||
if !a.NoError(err) {
|
||||
a.T().Errorf("========[Test_ZoneAdd] response error:%s", err)
|
||||
a.T().Errorf("========[Test_GenerateLink] response error:%s", err)
|
||||
return
|
||||
}
|
||||
resultByte, err := json.Marshal(result)
|
||||
if err != nil {
|
||||
a.T().Errorf("========[Test_ZoneAdd] json_marshal error:%s", err)
|
||||
a.T().Errorf("========[Test_GenerateLink] json_marshal error:%s", err)
|
||||
return
|
||||
}
|
||||
a.T().Logf("=====[Test_ZoneAdd] result: %s", string(resultByte))
|
||||
}
|
||||
|
||||
func (a *apiClientSuite) Test_GenerateH5Url() {
|
||||
req := GenerateH5UrlRequest{
|
||||
ActivityUrl: PromotionUrl,
|
||||
Sid: "1963667",
|
||||
}
|
||||
result, err := a.api.GenerateH5Url(context.Background(), req)
|
||||
if !a.NoError(err) {
|
||||
a.T().Errorf("========[Test_GenerateH5Url] response error:%s", err)
|
||||
return
|
||||
}
|
||||
|
||||
a.T().Logf("=====[Test_GenerateH5Url] result: %s", result)
|
||||
a.T().Logf("=====[Test_GenerateLink] result: %s", string(resultByte))
|
||||
}
|
||||
|
||||
@ -2,5 +2,4 @@ package zjdg
|
||||
|
||||
const (
|
||||
ZoneAddUrl = "https://p.zjdg.cn/cpa/api/ugApi.ashx?method=getadzone_nologin&userid="
|
||||
PromotionUrl = "http://2025.zjdg.cn/ditui/qrcode?adzoneid=&userid="
|
||||
)
|
||||
|
||||
@ -1,11 +1,5 @@
|
||||
package zjdg
|
||||
|
||||
// GenerateH5UrlRequest 生成H5链接请求
|
||||
type GenerateH5UrlRequest struct {
|
||||
ActivityUrl string `json:"activityUrl"` // 活动url
|
||||
Sid string `json:"sid"` // 二级分销ID
|
||||
}
|
||||
|
||||
type ZoneAddRequest struct {
|
||||
}
|
||||
type ZoneAddResponse struct {
|
||||
|
||||
@ -3,10 +3,12 @@ package ability132
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/request"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability132/response"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
)
|
||||
|
||||
type Ability132 struct {
|
||||
@ -17,46 +19,6 @@ func NewAbility132(client *topsdk.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
|
||||
}
|
||||
|
||||
/*
|
||||
批量发送消息
|
||||
*/
|
||||
@ -137,6 +99,46 @@ func (ability *Ability132) TaobaoTmcGroupAdd(req *request.TaobaoTmcGroupAddReque
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
删除消息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
|
||||
}
|
||||
|
||||
/*
|
||||
确认消费消息的状态
|
||||
*/
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoTmcAuthGetResponse struct {
|
||||
|
||||
/*
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoTmcGroupDeleteResponse struct {
|
||||
|
||||
/*
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoTmcMessagesConfirmResponse struct {
|
||||
|
||||
/*
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoTmcTopicGroupAddResponse struct {
|
||||
|
||||
/*
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoTmcTopicGroupDeleteResponse struct {
|
||||
|
||||
/*
|
||||
|
||||
218
sdk/topsdk/ability304/Ability304.go
Normal file
218
sdk/topsdk/ability304/Ability304.go
Normal file
@ -0,0 +1,218 @@
|
||||
package ability304
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability304/request"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability304/response"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||
)
|
||||
|
||||
type Ability304 struct {
|
||||
Client *topsdk.TopClient
|
||||
}
|
||||
|
||||
func NewAbility304(client *topsdk.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
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
14
sdk/topsdk/ability304/request/TaobaoAppipGetRequest.go
Normal file
14
sdk/topsdk/ability304/request/TaobaoAppipGetRequest.go
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
49
sdk/topsdk/ability304/request/TaobaoFilesGetRequest.go
Normal file
49
sdk/topsdk/ability304/request/TaobaoFilesGetRequest.go
Normal file
@ -0,0 +1,49 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
14
sdk/topsdk/ability304/request/TaobaoHttpdnsGetRequest.go
Normal file
14
sdk/topsdk/ability304/request/TaobaoHttpdnsGetRequest.go
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
14
sdk/topsdk/ability304/request/TaobaoOpenuidGetRequest.go
Normal file
14
sdk/topsdk/ability304/request/TaobaoOpenuidGetRequest.go
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
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
|
||||
}
|
||||
45
sdk/topsdk/ability304/request/TaobaoTopSecretGetRequest.go
Normal file
45
sdk/topsdk/ability304/request/TaobaoTopSecretGetRequest.go
Normal file
@ -0,0 +1,45 @@
|
||||
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
|
||||
}
|
||||
21
sdk/topsdk/ability304/response/TaobaoAppipGetResponse.go
Normal file
21
sdk/topsdk/ability304/response/TaobaoAppipGetResponse.go
Normal file
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
23
sdk/topsdk/ability304/response/TaobaoFilesGetResponse.go
Normal file
23
sdk/topsdk/ability304/response/TaobaoFilesGetResponse.go
Normal file
@ -0,0 +1,23 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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" `
|
||||
}
|
||||
21
sdk/topsdk/ability304/response/TaobaoHttpdnsGetResponse.go
Normal file
21
sdk/topsdk/ability304/response/TaobaoHttpdnsGetResponse.go
Normal file
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoOpenuidGetBymixnickResponse struct {
|
||||
|
||||
/*
|
||||
System request id
|
||||
*/
|
||||
RequestId string `json:"request_id,omitempty" `
|
||||
|
||||
/*
|
||||
System body
|
||||
*/
|
||||
Body string
|
||||
|
||||
/*
|
||||
OpenUID
|
||||
*/
|
||||
OpenUid string `json:"open_uid,omitempty" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
type TaobaoOpenuidGetBytradeResponse struct {
|
||||
|
||||
/*
|
||||
System request id
|
||||
*/
|
||||
RequestId string `json:"request_id,omitempty" `
|
||||
|
||||
/*
|
||||
System body
|
||||
*/
|
||||
Body string
|
||||
|
||||
/*
|
||||
当前交易tid对应买家的openuid
|
||||
*/
|
||||
OpenUid string `json:"open_uid,omitempty" `
|
||||
}
|
||||
21
sdk/topsdk/ability304/response/TaobaoOpenuidGetResponse.go
Normal file
21
sdk/topsdk/ability304/response/TaobaoOpenuidGetResponse.go
Normal file
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package response
|
||||
|
||||
import ()
|
||||
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
37
sdk/topsdk/ability304/response/TaobaoTopSecretGetResponse.go
Normal file
37
sdk/topsdk/ability304/response/TaobaoTopSecretGetResponse.go
Normal file
@ -0,0 +1,37 @@
|
||||
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" `
|
||||
}
|
||||
58
sdk/topsdk/ability305/Ability305.go
Normal file
58
sdk/topsdk/ability305/Ability305.go
Normal file
@ -0,0 +1,58 @@
|
||||
package ability305
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability305/request"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability305/response"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||
)
|
||||
|
||||
type Ability305 struct {
|
||||
Client *topsdk.TopClient
|
||||
}
|
||||
|
||||
func NewAbility305(client *topsdk.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
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
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
|
||||
}
|
||||
25
sdk/topsdk/ability305/request/TaobaoTmcQueueGetRequest.go
Normal file
25
sdk/topsdk/ability305/request/TaobaoTmcQueueGetRequest.go
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
23
sdk/topsdk/ability305/response/TaobaoTmcQueueGetResponse.go
Normal file
23
sdk/topsdk/ability305/response/TaobaoTmcQueueGetResponse.go
Normal file
@ -0,0 +1,23 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability305/domain"
|
||||
)
|
||||
|
||||
type TaobaoTmcQueueGetResponse struct {
|
||||
|
||||
/*
|
||||
System request id
|
||||
*/
|
||||
RequestId string `json:"request_id,omitempty" `
|
||||
|
||||
/*
|
||||
System body
|
||||
*/
|
||||
Body string
|
||||
|
||||
/*
|
||||
队列详细信息
|
||||
*/
|
||||
Datas []domain.TaobaoTmcQueueGetTmcQueueInfo `json:"datas,omitempty" `
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package response
|
||||
|
||||
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" `
|
||||
}
|
||||
158
sdk/topsdk/ability362/Ability362.go
Normal file
158
sdk/topsdk/ability362/Ability362.go
Normal file
@ -0,0 +1,158 @@
|
||||
package ability362
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/request"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/response"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||
)
|
||||
|
||||
type Ability362 struct {
|
||||
Client *topsdk.TopClient
|
||||
}
|
||||
|
||||
func NewAbility362(client *topsdk.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
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/ability362/domain"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/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
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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" `
|
||||
}
|
||||
@ -7,7 +7,7 @@ package topsdk
|
||||
*/
|
||||
const (
|
||||
// SdkVersion 版本号
|
||||
SdkVersion = "new_go_sdk_20250610"
|
||||
SdkVersion = "new_go_sdk_20240425"
|
||||
|
||||
// ApiFormat api格式
|
||||
ApiFormat = "json"
|
||||
|
||||
@ -3,10 +3,12 @@ package defaultability
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/request"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/defaultability/response"
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk/util"
|
||||
|
||||
"repository.lenntc.com/lenntc/third-platform-sdk/sdk/topsdk"
|
||||
)
|
||||
|
||||
type Defaultability struct {
|
||||
@ -137,546 +139,6 @@ func (ability *Defaultability) AlibabaAlscUnionElemePromotionItempromotionStoreQ
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
本地联盟商品编辑(未开放)
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionSupplyOuterItemEdit(req *request.AlibabaAlscUnionSupplyOuterItemEditRequest) (*response.AlibabaAlscUnionSupplyOuterItemEditResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.supply.outer.item.edit", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionSupplyOuterItemEditResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionSupplyOuterItemEdit 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) AlibabaAlscUnionSupplyOuterItemStateUpdate(req *request.AlibabaAlscUnionSupplyOuterItemStateUpdateRequest) (*response.AlibabaAlscUnionSupplyOuterItemStateUpdateResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.supply.outer.item.state.update", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionSupplyOuterItemStateUpdateResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionSupplyOuterItemStateUpdate error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
||||
respStruct.Body = jsonStr
|
||||
}
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
本地生活媒体推广口碑CPA用户反作弊订单数据报表
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbcpaPunishOrderGet(req *request.AlibabaAlscUnionKbcpaPunishOrderGetRequest) (*response.AlibabaAlscUnionKbcpaPunishOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpa.punish.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpaPunishOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpaPunishOrderGet 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) AlibabaAlscUnionElemeMediaActivityCouponSend(req *request.AlibabaAlscUnionElemeMediaActivityCouponSendRequest) (*response.AlibabaAlscUnionElemeMediaActivityCouponSendResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.media.activity.coupon.send", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemeMediaActivityCouponSendResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemeMediaActivityCouponSend 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) AlibabaAlscUnionSupplyOuterItemPublish(req *request.AlibabaAlscUnionSupplyOuterItemPublishRequest) (*response.AlibabaAlscUnionSupplyOuterItemPublishResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.supply.outer.item.publish", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionSupplyOuterItemPublishResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionSupplyOuterItemPublish 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) AlibabaAlscUnionElemePromotionOtherchannelGet(req *request.AlibabaAlscUnionElemePromotionOtherchannelGetRequest) (*response.AlibabaAlscUnionElemePromotionOtherchannelGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.otherchannel.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionOtherchannelGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionOtherchannelGet 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) AlibabaAlscUnionElemePromotionStorepromotionQuery(req *request.AlibabaAlscUnionElemePromotionStorepromotionQueryRequest) (*response.AlibabaAlscUnionElemePromotionStorepromotionQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.storepromotion.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionStorepromotionQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionStorepromotionQuery 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) AlibabaAlscUnionElemePromotionStorepromotionGet(req *request.AlibabaAlscUnionElemePromotionStorepromotionGetRequest) (*response.AlibabaAlscUnionElemePromotionStorepromotionGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.storepromotion.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionStorepromotionGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionStorepromotionGet 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) AlibabaAlscUnionElemePromotionOfficialactivityGet(req *request.AlibabaAlscUnionElemePromotionOfficialactivityGetRequest) (*response.AlibabaAlscUnionElemePromotionOfficialactivityGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.officialactivity.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionOfficialactivityGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionOfficialactivityGet 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) AlibabaAlscUnionElemePromotionStorepromotionBatchGet(req *request.AlibabaAlscUnionElemePromotionStorepromotionBatchGetRequest) (*response.AlibabaAlscUnionElemePromotionStorepromotionBatchGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.storepromotion.batch.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionStorepromotionBatchGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionStorepromotionBatchGet error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
||||
respStruct.Body = jsonStr
|
||||
}
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
本地生活媒体推广口碑CPA用户维权订单数据报表
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbcpaRefundOrderGet(req *request.AlibabaAlscUnionKbcpaRefundOrderGetRequest) (*response.AlibabaAlscUnionKbcpaRefundOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpa.refund.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpaRefundOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpaRefundOrderGet 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) AlibabaAlscUnionKbStoreQuery(req *request.AlibabaAlscUnionKbStoreQueryRequest) (*response.AlibabaAlscUnionKbStoreQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.store.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbStoreQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbStoreQuery 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) AlibabaAlscUnionKbStoreItemQuery(req *request.AlibabaAlscUnionKbStoreItemQueryRequest) (*response.AlibabaAlscUnionKbStoreItemQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.store.item.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbStoreItemQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbStoreItemQuery 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) AlibabaAlscUnionSupplyOuterItemShare(req *request.AlibabaAlscUnionSupplyOuterItemShareRequest) (*response.AlibabaAlscUnionSupplyOuterItemShareResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.supply.outer.item.share", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionSupplyOuterItemShareResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionSupplyOuterItemShare 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) AlibabaAlscUnionElemePromotionItempromotionGet(req *request.AlibabaAlscUnionElemePromotionItempromotionGetRequest) (*response.AlibabaAlscUnionElemePromotionItempromotionGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.itempromotion.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionItempromotionGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionItempromotionGet 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) AlibabaAlscUnionElemePromotionItempromotionQuery(req *request.AlibabaAlscUnionElemePromotionItempromotionQueryRequest) (*response.AlibabaAlscUnionElemePromotionItempromotionQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.itempromotion.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionItempromotionQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionItempromotionQuery 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) AlibabaAlscUnionKbcpaOrderDetailsGet(req *request.AlibabaAlscUnionKbcpaOrderDetailsGetRequest) (*response.AlibabaAlscUnionKbcpaOrderDetailsGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpa.order.details.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpaOrderDetailsGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpaOrderDetailsGet 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) AlibabaAlscUnionElemePromotionRetailItempromotionGet(req *request.AlibabaAlscUnionElemePromotionRetailItempromotionGetRequest) (*response.AlibabaAlscUnionElemePromotionRetailItempromotionGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.retail.itempromotion.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionRetailItempromotionGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionRetailItempromotionGet 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) AlibabaAlscUnionKbItemDetailGet(req *request.AlibabaAlscUnionKbItemDetailGetRequest) (*response.AlibabaAlscUnionKbItemDetailGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.item.detail.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbItemDetailGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbItemDetailGet 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) AlibabaAlscUnionKbItemStoreRelationQuery(req *request.AlibabaAlscUnionKbItemStoreRelationQueryRequest) (*response.AlibabaAlscUnionKbItemStoreRelationQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.item.store.relation.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbItemStoreRelationQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbItemStoreRelationQuery 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) AlibabaAlscUnionKbcpxPositiveOrderGet(req *request.AlibabaAlscUnionKbcpxPositiveOrderGetRequest) (*response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpx.positive.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpxPositiveOrderGet 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) AlibabaAlscUnionKbItemStoreDetailGet(req *request.AlibabaAlscUnionKbItemStoreDetailGetRequest) (*response.AlibabaAlscUnionKbItemStoreDetailGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.item.store.detail.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbItemStoreDetailGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbItemStoreDetailGet 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) AlibabaAlscUnionElemePromotionRetailItempromotionQuery(req *request.AlibabaAlscUnionElemePromotionRetailItempromotionQueryRequest) (*response.AlibabaAlscUnionElemePromotionRetailItempromotionQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.retail.itempromotion.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionRetailItempromotionQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionRetailItempromotionQuery 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) AlibabaAlscUnionKbcpxRefundOrderGet(req *request.AlibabaAlscUnionKbcpxRefundOrderGetRequest) (*response.AlibabaAlscUnionKbcpxRefundOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpx.refund.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpxRefundOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpxRefundOrderGet 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) AlibabaAlscUnionKbcpxPunishOrderGet(req *request.AlibabaAlscUnionKbcpxPunishOrderGetRequest) (*response.AlibabaAlscUnionKbcpxPunishOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpx.punish.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpxPunishOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpxPunishOrderGet 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) AlibabaAlscUnionElemeWordDataGet(req *request.AlibabaAlscUnionElemeWordDataGetRequest) (*response.AlibabaAlscUnionElemeWordDataGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.word.data.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemeWordDataGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemeWordDataGet error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
||||
respStruct.Body = jsonStr
|
||||
}
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
本地联盟口碑商品列表
|
||||
*/
|
||||
@ -777,6 +239,126 @@ func (ability *Defaultability) AlibabaAlscUnionElemeStorepromotionReviewbwcDetai
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
本地生活媒体推广口碑CPA用户反作弊订单数据报表
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbcpaPunishOrderGet(req *request.AlibabaAlscUnionKbcpaPunishOrderGetRequest) (*response.AlibabaAlscUnionKbcpaPunishOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpa.punish.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpaPunishOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpaPunishOrderGet 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) AlibabaAlscUnionElemeMediaActivityCouponSend(req *request.AlibabaAlscUnionElemeMediaActivityCouponSendRequest) (*response.AlibabaAlscUnionElemeMediaActivityCouponSendResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.media.activity.coupon.send", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemeMediaActivityCouponSendResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemeMediaActivityCouponSend 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) AlibabaAlscUnionElemePromotionStorepromotionQuery(req *request.AlibabaAlscUnionElemePromotionStorepromotionQueryRequest) (*response.AlibabaAlscUnionElemePromotionStorepromotionQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.storepromotion.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionStorepromotionQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionStorepromotionQuery 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) AlibabaAlscUnionElemePromotionStorepromotionGet(req *request.AlibabaAlscUnionElemePromotionStorepromotionGetRequest) (*response.AlibabaAlscUnionElemePromotionStorepromotionGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.storepromotion.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionStorepromotionGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionStorepromotionGet 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) AlibabaAlscUnionElemePromotionOfficialactivityGet(req *request.AlibabaAlscUnionElemePromotionOfficialactivityGetRequest) (*response.AlibabaAlscUnionElemePromotionOfficialactivityGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.officialactivity.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionOfficialactivityGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionOfficialactivityGet error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
||||
respStruct.Body = jsonStr
|
||||
}
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
发布单条消息
|
||||
*/
|
||||
@ -798,7 +380,47 @@ func (ability *Defaultability) TaobaoTmcMessageProduce(req *request.TaobaoTmcMes
|
||||
}
|
||||
|
||||
/*
|
||||
本地生活媒体创建商品推广链接(废弃勿用)
|
||||
本地生活媒体推广口碑CPA用户维权订单数据报表
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbcpaRefundOrderGet(req *request.AlibabaAlscUnionKbcpaRefundOrderGetRequest) (*response.AlibabaAlscUnionKbcpaRefundOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpa.refund.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpaRefundOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpaRefundOrderGet 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) AlibabaAlscUnionKbStoreQuery(req *request.AlibabaAlscUnionKbStoreQueryRequest) (*response.AlibabaAlscUnionKbStoreQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.store.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbStoreQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbStoreQuery 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) AlibabaAlscUnionKbItemPromotionShareCreate(req *request.AlibabaAlscUnionKbItemPromotionShareCreateRequest) (*response.AlibabaAlscUnionKbItemPromotionShareCreateResponse, error) {
|
||||
if ability.Client == nil {
|
||||
@ -817,6 +439,26 @@ func (ability *Defaultability) AlibabaAlscUnionKbItemPromotionShareCreate(req *r
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
本地联盟口碑门店商品列表
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbStoreItemQuery(req *request.AlibabaAlscUnionKbStoreItemQueryRequest) (*response.AlibabaAlscUnionKbStoreItemQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.store.item.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbStoreItemQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbStoreItemQuery error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
||||
respStruct.Body = jsonStr
|
||||
}
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
取消用户的消息服务
|
||||
*/
|
||||
@ -858,16 +500,36 @@ func (ability *Defaultability) TaobaoTmcUserPermit(req *request.TaobaoTmcUserPer
|
||||
}
|
||||
|
||||
/*
|
||||
本地联盟饿了么推广官方活动生成微信短链
|
||||
本地联盟饿了么单品推广详情
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionElemePromotionOfficialactivityWxscheme(req *request.AlibabaAlscUnionElemePromotionOfficialactivityWxschemeRequest) (*response.AlibabaAlscUnionElemePromotionOfficialactivityWxschemeResponse, error) {
|
||||
func (ability *Defaultability) AlibabaAlscUnionElemePromotionItempromotionGet(req *request.AlibabaAlscUnionElemePromotionItempromotionGetRequest) (*response.AlibabaAlscUnionElemePromotionItempromotionGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.officialactivity.wxscheme", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionOfficialactivityWxschemeResponse{}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.itempromotion.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionItempromotionGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionOfficialactivityWxscheme error", err)
|
||||
log.Println("alibabaAlscUnionElemePromotionItempromotionGet 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) AlibabaAlscUnionElemePromotionItempromotionQuery(req *request.AlibabaAlscUnionElemePromotionItempromotionQueryRequest) (*response.AlibabaAlscUnionElemePromotionItempromotionQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.promotion.itempromotion.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemePromotionItempromotionQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemePromotionItempromotionQuery error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
@ -898,16 +560,16 @@ func (ability *Defaultability) AlibabaAlscUnionPromotionLinkAnalyze(req *request
|
||||
}
|
||||
|
||||
/*
|
||||
本地联盟饿了么评价有礼诊断
|
||||
本地生活媒体推广订单明细查询
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionElemeStorepromotionReviewbwcDiagnose(req *request.AlibabaAlscUnionElemeStorepromotionReviewbwcDiagnoseRequest) (*response.AlibabaAlscUnionElemeStorepromotionReviewbwcDiagnoseResponse, error) {
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbcpaOrderDetailsGet(req *request.AlibabaAlscUnionKbcpaOrderDetailsGetRequest) (*response.AlibabaAlscUnionKbcpaOrderDetailsGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.storepromotion.reviewbwc.diagnose", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemeStorepromotionReviewbwcDiagnoseResponse{}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpa.order.details.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpaOrderDetailsGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemeStorepromotionReviewbwcDiagnose error", err)
|
||||
log.Println("alibabaAlscUnionKbcpaOrderDetailsGet error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
@ -918,16 +580,116 @@ func (ability *Defaultability) AlibabaAlscUnionElemeStorepromotionReviewbwcDiagn
|
||||
}
|
||||
|
||||
/*
|
||||
本地联盟饿了么评价有身份绑定
|
||||
本地联盟口碑商品详情
|
||||
*/
|
||||
func (ability *Defaultability) AlibabaAlscUnionElemeStorepromotionReviewbwcBindLinkGet(req *request.AlibabaAlscUnionElemeStorepromotionReviewbwcBindLinkGetRequest) (*response.AlibabaAlscUnionElemeStorepromotionReviewbwcBindLinkGetResponse, error) {
|
||||
func (ability *Defaultability) AlibabaAlscUnionKbItemDetailGet(req *request.AlibabaAlscUnionKbItemDetailGetRequest) (*response.AlibabaAlscUnionKbItemDetailGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.eleme.storepromotion.reviewbwc.bind.link.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionElemeStorepromotionReviewbwcBindLinkGetResponse{}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.item.detail.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbItemDetailGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionElemeStorepromotionReviewbwcBindLinkGet error", err)
|
||||
log.Println("alibabaAlscUnionKbItemDetailGet 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) AlibabaAlscUnionKbItemStoreRelationQuery(req *request.AlibabaAlscUnionKbItemStoreRelationQueryRequest) (*response.AlibabaAlscUnionKbItemStoreRelationQueryResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.item.store.relation.query", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbItemStoreRelationQueryResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbItemStoreRelationQuery 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) AlibabaAlscUnionKbcpxPositiveOrderGet(req *request.AlibabaAlscUnionKbcpxPositiveOrderGetRequest) (*response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpx.positive.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpxPositiveOrderGet 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) AlibabaAlscUnionKbItemStoreDetailGet(req *request.AlibabaAlscUnionKbItemStoreDetailGetRequest) (*response.AlibabaAlscUnionKbItemStoreDetailGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kb.item.store.detail.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbItemStoreDetailGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbItemStoreDetailGet 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) AlibabaAlscUnionKbcpxRefundOrderGet(req *request.AlibabaAlscUnionKbcpxRefundOrderGetRequest) (*response.AlibabaAlscUnionKbcpxRefundOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpx.refund.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpxRefundOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpxRefundOrderGet 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) AlibabaAlscUnionKbcpxPunishOrderGet(req *request.AlibabaAlscUnionKbcpxPunishOrderGetRequest) (*response.AlibabaAlscUnionKbcpxPunishOrderGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("alibaba.alsc.union.kbcpx.punish.order.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.AlibabaAlscUnionKbcpxPunishOrderGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("alibabaAlscUnionKbcpxPunishOrderGet error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
|
||||
@ -14,20 +14,12 @@ type AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest struct {
|
||||
Sid *string `json:"sid,omitempty" `
|
||||
|
||||
/*
|
||||
【废弃】 */
|
||||
是否返回微信推广图片 */
|
||||
IncludeWxImg *bool `json:"include_wx_img,omitempty" `
|
||||
|
||||
/*
|
||||
是否返回二维码 */
|
||||
是否包含二维码,如果为false,不返回二维码和图片,只有链接 */
|
||||
IncludeQrCode *bool `json:"include_qr_code,omitempty" `
|
||||
|
||||
/*
|
||||
是否返回图片 */
|
||||
IncludeImage *bool `json:"include_image,omitempty" `
|
||||
|
||||
/*
|
||||
是否返回密令 */
|
||||
IncludeWatchword *bool `json:"include_watchword,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest) SetPid(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest {
|
||||
@ -50,11 +42,3 @@ func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest) SetIn
|
||||
s.IncludeQrCode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest) SetIncludeImage(v bool) *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest {
|
||||
s.IncludeImage = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest) SetIncludeWatchword(v bool) *AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest {
|
||||
s.IncludeWatchword = &v
|
||||
return s
|
||||
}
|
||||
|
||||
@ -60,26 +60,6 @@ type AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink struct {
|
||||
/*
|
||||
带文案淘口令(有效期30天,建议到期前重新获取) */
|
||||
FullTaobaoWord *string `json:"full_taobao_word,omitempty" `
|
||||
|
||||
/*
|
||||
推广链接 */
|
||||
H5Promotion *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto `json:"h5_promotion,omitempty" `
|
||||
|
||||
/*
|
||||
淘宝链接 */
|
||||
TaobaoPromotion *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto `json:"taobao_promotion,omitempty" `
|
||||
|
||||
/*
|
||||
微信链接 */
|
||||
WxPromotion *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto `json:"wx_promotion,omitempty" `
|
||||
|
||||
/*
|
||||
支付宝链接 */
|
||||
AlipayPromotion *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto `json:"alipay_promotion,omitempty" `
|
||||
|
||||
/*
|
||||
app链接 */
|
||||
AppPromotion *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto `json:"app_promotion,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetWxAppid(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink {
|
||||
@ -142,23 +122,3 @@ func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetFull
|
||||
s.FullTaobaoWord = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetH5Promotion(v AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto) *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink {
|
||||
s.H5Promotion = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetTaobaoPromotion(v AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink {
|
||||
s.TaobaoPromotion = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetWxPromotion(v AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink {
|
||||
s.WxPromotion = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetAlipayPromotion(v AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink {
|
||||
s.AlipayPromotion = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink) SetAppPromotion(v AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto) *AlibabaAlscUnionElemePromotionOfficialactivityGetPromotionLink {
|
||||
s.AppPromotion = &v
|
||||
return s
|
||||
}
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto struct {
|
||||
/*
|
||||
appId */
|
||||
AppId *string `json:"app_id,omitempty" `
|
||||
|
||||
/*
|
||||
appPath */
|
||||
AppPath *string `json:"app_path,omitempty" `
|
||||
|
||||
/*
|
||||
scheme唤端地址 */
|
||||
AlipaySchemeUrl *string `json:"alipay_scheme_url,omitempty" `
|
||||
|
||||
/*
|
||||
h5地址 */
|
||||
H5Url *string `json:"h5_url,omitempty" `
|
||||
|
||||
/*
|
||||
支付宝口令 */
|
||||
AlipayWatchword *string `json:"alipay_watchword,omitempty" `
|
||||
|
||||
/*
|
||||
支付宝完整口令 */
|
||||
AlipayWatchwordSuggest *string `json:"alipay_watchword_suggest,omitempty" `
|
||||
|
||||
/*
|
||||
海报地址 */
|
||||
ImgUrl *string `json:"img_url,omitempty" `
|
||||
|
||||
/*
|
||||
二维码地址 */
|
||||
AlipayQrCode *string `json:"alipay_qr_code,omitempty" `
|
||||
|
||||
/*
|
||||
h5短连接 */
|
||||
ShortLink *string `json:"short_link,omitempty" `
|
||||
|
||||
/*
|
||||
http换端地址 */
|
||||
H5SchemeUrl *string `json:"h5_scheme_url,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetAppId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.AppId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetAppPath(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.AppPath = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetAlipaySchemeUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.AlipaySchemeUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetH5Url(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.H5Url = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetAlipayWatchword(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.AlipayWatchword = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetAlipayWatchwordSuggest(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.AlipayWatchwordSuggest = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetImgUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.ImgUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetAlipayQrCode(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.AlipayQrCode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetShortLink(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.ShortLink = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto) SetH5SchemeUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAlipayPromotionDto {
|
||||
s.H5SchemeUrl = &v
|
||||
return s
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto struct {
|
||||
/*
|
||||
deeplink地址 */
|
||||
DeepLink *string `json:"deep_link,omitempty" `
|
||||
|
||||
/*
|
||||
饿口令 */
|
||||
ElemeWord *string `json:"eleme_word,omitempty" `
|
||||
|
||||
/*
|
||||
饿口令有效期 */
|
||||
WordValidDate *string `json:"word_valid_date,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto) SetDeepLink(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto {
|
||||
s.DeepLink = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto) SetElemeWord(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto {
|
||||
s.ElemeWord = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto) SetWordValidDate(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopAppPromotionDto {
|
||||
s.WordValidDate = &v
|
||||
return s
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto struct {
|
||||
/*
|
||||
长连接 */
|
||||
H5Url *string `json:"h5_url,omitempty" `
|
||||
|
||||
/*
|
||||
短连接 */
|
||||
ShortLink *string `json:"short_link,omitempty" `
|
||||
|
||||
/*
|
||||
推广二维码 */
|
||||
H5QrCode *string `json:"h5_qr_code,omitempty" `
|
||||
|
||||
/*
|
||||
推广海报 */
|
||||
H5ImgUrl *string `json:"h5_img_url,omitempty" `
|
||||
|
||||
/*
|
||||
推荐有奖拉新链接 */
|
||||
TjH5Url *string `json:"tj_h5_url,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto) SetH5Url(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto {
|
||||
s.H5Url = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto) SetShortLink(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto {
|
||||
s.ShortLink = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto) SetH5QrCode(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto {
|
||||
s.H5QrCode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto) SetH5ImgUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto {
|
||||
s.H5ImgUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto) SetTjH5Url(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopH5PromotionDto {
|
||||
s.TjH5Url = &v
|
||||
return s
|
||||
}
|
||||
@ -1,76 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto struct {
|
||||
/*
|
||||
推广链接 */
|
||||
H5Url *string `json:"h5_url,omitempty" `
|
||||
|
||||
/*
|
||||
短连接 */
|
||||
H5ShortUrl *string `json:"h5_short_url,omitempty" `
|
||||
|
||||
/*
|
||||
二维码 */
|
||||
TbQrCode *string `json:"tb_qr_code,omitempty" `
|
||||
|
||||
/*
|
||||
海报 */
|
||||
ImgUrl *string `json:"img_url,omitempty" `
|
||||
|
||||
/*
|
||||
appid */
|
||||
AppId *string `json:"app_id,omitempty" `
|
||||
|
||||
/*
|
||||
apppath */
|
||||
AppPath *string `json:"app_path,omitempty" `
|
||||
|
||||
/*
|
||||
schemeurl */
|
||||
SchemeUrl *string `json:"scheme_url,omitempty" `
|
||||
|
||||
/*
|
||||
淘口令 */
|
||||
TbWatchword *string `json:"tb_watchword,omitempty" `
|
||||
|
||||
/*
|
||||
淘口令完整版 */
|
||||
TbWatchwordSuggest *string `json:"tb_watchword_suggest,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetH5Url(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.H5Url = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetH5ShortUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.H5ShortUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetTbQrCode(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.TbQrCode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetImgUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.ImgUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetAppId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.AppId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetAppPath(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.AppPath = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetSchemeUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.SchemeUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetTbWatchword(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.TbWatchword = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto) SetTbWatchwordSuggest(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopTaobaoPromotionDto {
|
||||
s.TbWatchwordSuggest = &v
|
||||
return s
|
||||
}
|
||||
@ -1,92 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto struct {
|
||||
/*
|
||||
appid */
|
||||
WxAppId *string `json:"wx_app_id,omitempty" `
|
||||
|
||||
/*
|
||||
apppath */
|
||||
WxPath *string `json:"wx_path,omitempty" `
|
||||
|
||||
/*
|
||||
二维码 */
|
||||
WxQrCode *string `json:"wx_qr_code,omitempty" `
|
||||
|
||||
/*
|
||||
海报 */
|
||||
ImgUrl *string `json:"img_url,omitempty" `
|
||||
|
||||
/*
|
||||
立减的appid */
|
||||
ReduceWxAppId *string `json:"reduce_wx_app_id,omitempty" `
|
||||
|
||||
/*
|
||||
立减的apppath */
|
||||
ReduceWxPath *string `json:"reduce_wx_path,omitempty" `
|
||||
|
||||
/*
|
||||
立减的二维码 */
|
||||
ReduceWxQrCode *string `json:"reduce_wx_qr_code,omitempty" `
|
||||
|
||||
/*
|
||||
立减的海报 */
|
||||
ReduceImgUrl *string `json:"reduce_img_url,omitempty" `
|
||||
|
||||
/*
|
||||
h5短链 */
|
||||
H5ShortLink *string `json:"h5_short_link,omitempty" `
|
||||
|
||||
/*
|
||||
媒体出资appid */
|
||||
MarketWxAppId *string `json:"market_wx_app_id,omitempty" `
|
||||
|
||||
/*
|
||||
媒体出资apppath */
|
||||
MarketWxAppPath *string `json:"market_wx_app_path,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetWxAppId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.WxAppId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetWxPath(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.WxPath = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetWxQrCode(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.WxQrCode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetImgUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.ImgUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetReduceWxAppId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.ReduceWxAppId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetReduceWxPath(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.ReduceWxPath = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetReduceWxQrCode(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.ReduceWxQrCode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetReduceImgUrl(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.ReduceImgUrl = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetH5ShortLink(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.H5ShortLink = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetMarketWxAppId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.MarketWxAppId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto) SetMarketWxAppPath(v string) *AlibabaAlscUnionElemePromotionOfficialactivityGetTopWxPromotionDto {
|
||||
s.MarketWxAppPath = &v
|
||||
return s
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest struct {
|
||||
/*
|
||||
渠道PID */
|
||||
Pid *string `json:"pid,omitempty" `
|
||||
|
||||
/*
|
||||
活动ID */
|
||||
ActivityId *string `json:"activity_id,omitempty" `
|
||||
|
||||
/*
|
||||
三方会员id。长度限制50 */
|
||||
Sid *string `json:"sid,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest) SetPid(v string) *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest {
|
||||
s.Pid = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest) SetActivityId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest {
|
||||
s.ActivityId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest) SetSid(v string) *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeActivityRequest {
|
||||
s.Sid = &v
|
||||
return s
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto struct {
|
||||
/*
|
||||
微信appid */
|
||||
WxAppId *string `json:"wx_app_id,omitempty" `
|
||||
|
||||
/*
|
||||
微信小程序path链接 */
|
||||
WxPath *string `json:"wx_path,omitempty" `
|
||||
|
||||
/*
|
||||
微信密文短链 */
|
||||
UrlScheme *string `json:"url_scheme,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto) SetWxAppId(v string) *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto {
|
||||
s.WxAppId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto) SetWxPath(v string) *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto {
|
||||
s.WxPath = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto) SetUrlScheme(v string) *AlibabaAlscUnionElemePromotionOfficialactivityWxschemeTopWxPromotionDto {
|
||||
s.UrlScheme = &v
|
||||
return s
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLink struct {
|
||||
/*
|
||||
抖音内部跳转shcema地址,30天有效 */
|
||||
DySchema *string `json:"dy_schema,omitempty" `
|
||||
|
||||
/*
|
||||
抖音外部唤起链接,30天有效 */
|
||||
DyLink *string `json:"dy_link,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLink) SetDySchema(v string) *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLink {
|
||||
s.DySchema = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLink) SetDyLink(v string) *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLink {
|
||||
s.DyLink = &v
|
||||
return s
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLinkRequest struct {
|
||||
/*
|
||||
链接类型 1 抖音schema */
|
||||
Type *int64 `json:"type,omitempty" `
|
||||
|
||||
/*
|
||||
用户扩展id */
|
||||
Sid *string `json:"sid,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLinkRequest) SetType(v int64) *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLinkRequest {
|
||||
s.Type = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLinkRequest) SetSid(v string) *AlibabaAlscUnionElemePromotionOtherchannelGetOtherPromotionLinkRequest {
|
||||
s.Sid = &v
|
||||
return s
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink struct {
|
||||
/*
|
||||
微信小程序appId */
|
||||
WxAppid *string `json:"wx_appid,omitempty" `
|
||||
|
||||
/*
|
||||
微信小程序path链接 */
|
||||
WxPath *string `json:"wx_path,omitempty" `
|
||||
|
||||
/*
|
||||
微信小程序二维码 */
|
||||
WxMiniQrcode *string `json:"wx_mini_qrcode,omitempty" `
|
||||
|
||||
/*
|
||||
微信推广图片 */
|
||||
WxPicture *string `json:"wx_picture,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink) SetWxAppid(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink {
|
||||
s.WxAppid = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink) SetWxPath(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink {
|
||||
s.WxPath = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink) SetWxMiniQrcode(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink {
|
||||
s.WxMiniQrcode = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink) SetWxPicture(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink {
|
||||
s.WxPicture = &v
|
||||
return s
|
||||
}
|
||||
@ -1,92 +0,0 @@
|
||||
package domain
|
||||
|
||||
type AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto struct {
|
||||
/*
|
||||
商品ID */
|
||||
ItemId *string `json:"item_id,omitempty" `
|
||||
|
||||
/*
|
||||
名称 */
|
||||
ItemName *string `json:"item_name,omitempty" `
|
||||
|
||||
/*
|
||||
图片 */
|
||||
Picture *string `json:"picture,omitempty" `
|
||||
|
||||
/*
|
||||
售价(分) */
|
||||
SellPriceCent *int64 `json:"sell_price_cent,omitempty" `
|
||||
|
||||
/*
|
||||
起始时间(秒) */
|
||||
StartIme *int64 `json:"start_ime,omitempty" `
|
||||
|
||||
/*
|
||||
结束时间(秒) */
|
||||
EndTime *int64 `json:"end_time,omitempty" `
|
||||
|
||||
/*
|
||||
单品佣金比例 */
|
||||
CommissionRate *string `json:"commission_rate,omitempty" `
|
||||
|
||||
/*
|
||||
单品预估佣金(分) */
|
||||
Commission *int64 `json:"commission,omitempty" `
|
||||
|
||||
/*
|
||||
库存 */
|
||||
Stock *int64 `json:"stock,omitempty" `
|
||||
|
||||
/*
|
||||
优惠信息 */
|
||||
DiscountTags *[]string `json:"discount_tags,omitempty" `
|
||||
|
||||
/*
|
||||
分享链接 */
|
||||
Link *AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink `json:"link,omitempty" `
|
||||
}
|
||||
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetItemId(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.ItemId = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetItemName(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.ItemName = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetPicture(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.Picture = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetSellPriceCent(v int64) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.SellPriceCent = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetStartIme(v int64) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.StartIme = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetEndTime(v int64) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.EndTime = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetCommissionRate(v string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.CommissionRate = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetCommission(v int64) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.Commission = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetStock(v int64) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.Stock = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetDiscountTags(v []string) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.DiscountTags = &v
|
||||
return s
|
||||
}
|
||||
func (s *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto) SetLink(v AlibabaAlscUnionElemePromotionRetailItempromotionGetPromotionLink) *AlibabaAlscUnionElemePromotionRetailItempromotionGetRetailItemPromotionDetailDto {
|
||||
s.Link = &v
|
||||
return s
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user