-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(patch): add crm & qianniu path related
- Loading branch information
shuai
committed
Jan 19, 2024
1 parent
ef89834
commit a68bb7e
Showing
22 changed files
with
836 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
98
metadata/assets/patch/crm/taobao_crm_member_identity_get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
65
metadata/assets/patch/crm/taobao_crm_member_joinurl_get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
metadata/assets/patch/qianniu/taobao_qianniu_auto_task_config_check.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
Oops, something went wrong.