2 Star 0 Fork 0

hansdq/dyQcSDk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
spu_getSpuTpl_request.go 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
Hansdq 提交于 2022-12-25 22:28 . 路径迁移
package spu_getSpuTpl_request
import (
"gitee.com/hansdq/dy-qc-sdk/api/spu_getSpuTpl/response"
"gitee.com/hansdq/dy-qc-sdk/core"
"encoding/json"
)
type SpuGetSpuTplRequest struct {
doudian_sdk.BaseDoudianOpApiRequest
Param *SpuGetSpuTplParam
}
func (c *SpuGetSpuTplRequest) GetUrlPath() string{
return "/spu/getSpuTpl"
}
func New() *SpuGetSpuTplRequest{
request := &SpuGetSpuTplRequest{
Param: &SpuGetSpuTplParam{},
}
request.SetConfig(doudian_sdk.GlobalConfig)
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
return request
}
func (c *SpuGetSpuTplRequest) Execute(accessToken *doudian_sdk.AccessToken) (*spu_getSpuTpl_response.SpuGetSpuTplResponse, error){
responseJson, err := c.GetClient().Request(c, accessToken)
if err != nil {
return nil, err
}
response := &spu_getSpuTpl_response.SpuGetSpuTplResponse{}
_ = json.Unmarshal([]byte(responseJson), response)
return response, nil
}
func (c *SpuGetSpuTplRequest) GetParamObject() interface{}{
return c.Param
}
func (c *SpuGetSpuTplRequest) GetParams() *SpuGetSpuTplParam{
return c.Param
}
type SpuGetSpuTplParam struct {
// 类目id
CategoryId int64 `json:"category_id"`
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/hansdq/dy-qc-sdk.git
git@gitee.com:hansdq/dy-qc-sdk.git
hansdq
dy-qc-sdk
dyQcSDk
v1.0.8

搜索帮助

0d507c66 1850385 C8b1a773 1850385