Skip to content

Commit

Permalink
feat(patch): add crm & qianniu path related
Browse files Browse the repository at this point in the history
  • Loading branch information
shuai committed Jan 19, 2024
1 parent ef89834 commit a68bb7e
Show file tree
Hide file tree
Showing 22 changed files with 836 additions and 35 deletions.
14 changes: 14 additions & 0 deletions api/crm/TaobaoCrmMemberIdentityGet.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package crm

import (
"github.com/bububa/opentaobao/core"
"github.com/bububa/opentaobao/model/crm"
)

// TaobaoCrmMemberIdentityGet 会员身份识别
// taobao.crm.member.identity.get
//
// 用来识别该用户是否是商家会员
func TaobaoCrmMemberIdentityGet(clt *core.SDKClient, req *crm.TaobaoCrmMemberIdentityGetAPIRequest, resp *crm.TaobaoCrmMemberIdentityGetAPIResponse, session string) error {
return clt.Post(req, resp, session)
}
14 changes: 14 additions & 0 deletions api/crm/TaobaoCrmMemberJoinurlGet.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package crm

import (
"github.com/bububa/opentaobao/core"
"github.com/bububa/opentaobao/model/crm"
)

// TaobaoCrmMemberJoinurlGet 会员入会地址获取
// taobao.crm.member.joinurl.get
//
// 会员入会地址获取
func TaobaoCrmMemberJoinurlGet(clt *core.SDKClient, req *crm.TaobaoCrmMemberJoinurlGetAPIRequest, resp *crm.TaobaoCrmMemberJoinurlGetAPIResponse, session string) error {
return clt.Post(req, resp, session)
}
14 changes: 14 additions & 0 deletions api/qianniu/TaobaoQianniuAutoTaskConfigCheck.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package qianniu

import (
"github.com/bububa/opentaobao/core"
"github.com/bububa/opentaobao/model/qianniu"
)

// TaobaoQianniuAutoTaskConfigCheck 自动化任务设置校验
// taobao.qianniu.auto.task.config.check
//
// 校验自动化任务配置
func TaobaoQianniuAutoTaskConfigCheck(clt *core.SDKClient, req *qianniu.TaobaoQianniuAutoTaskConfigCheckAPIRequest, resp *qianniu.TaobaoQianniuAutoTaskConfigCheckAPIResponse, session string) error {
return clt.Post(req, resp, session)
}
98 changes: 98 additions & 0 deletions metadata/assets/patch/crm/taobao_crm_member_identity_get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"name": "taobao.crm.member.identity.get",
"apiChineseName": "会员身份识别",
"description": "用来识别该用户是否是商家会员",
"id": 34436,
"requestParams": [
{
"name": "extra_info",
"type": "String",
"description": "扩展参数为JSON字符串,用于埋点统计,source为来源字段固定值 paiyangji代表来源派样机类型设备,deviceId 为设备id,itemId 相关商品id",
"required": false
},
{
"name": "mix_nick",
"type": "String",
"description": "混淆昵称,",
"required": false
},
{
"name": "nick",
"type": "String",
"description": "明文nick,可不填,直接填混淆昵称",
"required": false
},
{
"name": "open_id",
"type": "String",
"description": "open_id",
"required": false
}
],
"responseParams": [
{
"name": "result",
"description": "result",
"subParams": [
{
"name": "total",
"type": "Number",
"description": "total",
"required": false
},
{
"name": "member_info",
"description": "result",
"subParams": [
{
"name": "grade",
"type": "Number",
"description": "等级编号",
"subParams": [],
"required": false
},
{
"name": "grade_name",
"type": "String",
"description": "等级名称",
"subParams": [],
"required": false
},
{
"name": "gmt_create",
"type": "String",
"description": "gmtCreate",
"subParams": [],
"required": false
},
{
"name": "bind_status",
"type": "Number",
"description": "bindStatus 1:绑卡(已经是线下会员线上未绑定,或者解绑后再绑定),2:注册",
"subParams": [],
"required": false
}
],
"type": "MemberAccountDto",
"required": false
},
{
"name": "code",
"type": "String",
"description": "code",
"subParams": [],
"required": false
},
{
"name": "msg",
"type": "String",
"description": "msg",
"subParams": [],
"required": false
}
],
"type": "ResultDto",
"required": false
}
]
}
65 changes: 65 additions & 0 deletions metadata/assets/patch/crm/taobao_crm_member_joinurl_get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "taobao.crm.member.joinurl.get",
"apiChineseName": "会员入会地址获取",
"description": "会员入会地址获取",
"id": 35156,
"requestParams": [
{
"name": "callback_url",
"type": "String",
"description": "回调url",
"required": false
},
{
"name": "extra_info",
"type": "String",
"description": "扩展参数为JSON字符串,用于埋点统计,source为来源字段固定值 isvapp可录入的其他参数,活动ID:activityId三方招募来源:entrance",
"required": true
}
],
"responseParams": [
{
"name": "result",
"type": "Result",
"description": "result",
"required": false,
"subParams": [
{
"name": "total",
"type": "Number",
"description": "total",
"required": false
},
{
"name": "result",
"type": "String",
"description": "返回入会地址URL,需自行判断协议头,如返回结果为\/\/建议使用https:\/\/",
"required": false
},
{
"name": "error_code",
"type": "Number",
"description": "errorCode",
"required": false
},
{
"name": "error_msg",
"type": "String",
"required": false
},
{
"name": "success",
"type": "Boolean",
"description": "success",
"required": false
},
{
"name": "exception_code",
"type": "String",
"description": "exceptionCode",
"required": false
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "taobao.qianniu.auto.task.config.check",
"apiChineseName": "自动化任务设置校验",
"description": "校验自动化任务配置",
"id": 53528,
"requestParams": [
{
"name": "auto_task",
"type": "String",
"description": "场景,例如:催拍= RemindBuyBot"
}
],
"responseParams": [
{
"description": "是否成功",
"name": "rpc_success",
"type": "Boolean"
},
{
"description": "success",
"name": "module",
"type": "Boolean"
},
{
"description": "错误信息",
"name": "rpc_error_message",
"type": "String"
},
{
"description": "错误码",
"name": "rpc_error_code",
"type": "Number"
}
]
}
11 changes: 0 additions & 11 deletions model/aecreatives/AffiliateProductResponseDto.go

This file was deleted.

9 changes: 0 additions & 9 deletions model/aecreatives/AffiliateProductResultDto.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type AliexpressAffiliateFeaturedpromoGetAPIResponseModel struct {
// 平台颁发的每次请求访问的唯一标识
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// 返回结果
RespResult *TrafficFeaturedPromoResponseDto `json:"resp_result,omitempty" xml:"resp_result,omitempty"`
RespResult *ResponseDto `json:"resp_result,omitempty" xml:"resp_result,omitempty"`
}

// Reset 清空结构体
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type AliexpressAffiliateProductdetailGetAPIResponseModel struct {
// 平台颁发的每次请求访问的唯一标识
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// 返回结果
RespResult *AffiliateProductResponseDto `json:"resp_result,omitempty" xml:"resp_result,omitempty"`
RespResult *ResponseDto `json:"resp_result,omitempty" xml:"resp_result,omitempty"`
}

// Reset 清空结构体
Expand Down
4 changes: 2 additions & 2 deletions model/aecreatives/ResponseDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type ResponseDto struct {
RespMsg string `json:"resp_msg,omitempty" xml:"resp_msg,omitempty"`
// 返回结果状态码
RespCode int64 `json:"resp_code,omitempty" xml:"resp_code,omitempty"`
// 返回结果状态明细
Result *TrafficProductResultDto `json:"result,omitempty" xml:"result,omitempty"`
// 返回结果明细
Result *TrafficFeaturedPromoResultDto `json:"result,omitempty" xml:"result,omitempty"`
}

var poolResponseDto = sync.Pool{
Expand Down
11 changes: 0 additions & 11 deletions model/aecreatives/TrafficFeaturedPromoResponseDto.go

This file was deleted.

37 changes: 37 additions & 0 deletions model/crm/MemberAccountDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package crm

import (
"sync"
)

// MemberAccountDto 结构体
type MemberAccountDto struct {
// 等级名称
GradeName string `json:"grade_name,omitempty" xml:"grade_name,omitempty"`
// gmtCreate
GmtCreate string `json:"gmt_create,omitempty" xml:"gmt_create,omitempty"`
// 等级编号
Grade int64 `json:"grade,omitempty" xml:"grade,omitempty"`
// bindStatus 1:绑卡(已经是线下会员线上未绑定,或者解绑后再绑定),2:注册
BindStatus int64 `json:"bind_status,omitempty" xml:"bind_status,omitempty"`
}

var poolMemberAccountDto = sync.Pool{
New: func() any {
return new(MemberAccountDto)
},
}

// GetMemberAccountDto() 从对象池中获取MemberAccountDto
func GetMemberAccountDto() *MemberAccountDto {
return poolMemberAccountDto.Get().(*MemberAccountDto)
}

// ReleaseMemberAccountDto 释放MemberAccountDto
func ReleaseMemberAccountDto(v *MemberAccountDto) {
v.GradeName = ""
v.GmtCreate = ""
v.Grade = 0
v.BindStatus = 0
poolMemberAccountDto.Put(v)
}
Loading

0 comments on commit a68bb7e

Please sign in to comment.