1
This commit is contained in:
@@ -45,40 +45,40 @@ func (c *ShopGetStoreListRequest) GetParams() *ShopGetStoreListParam {
|
||||
}
|
||||
|
||||
type ShopGetStoreListParam struct {
|
||||
// 门店名称集合,不支持模糊
|
||||
StoreNameList []string `json:"store_name_list"`
|
||||
// 门店id集合,用于查询门店信息
|
||||
StoreIdList []int64 `json:"store_id_list"`
|
||||
// 门店编码,开发者自定义
|
||||
StoreCodeList []string `json:"store_code_list"`
|
||||
// 绑定状态,1绑定中;2绑定成功;3:资质验证中;4账户认证中;5正常营业(c端可下单)
|
||||
State int64 `json:"state"`
|
||||
// poi审核状态:0无提审;1审核中;2审核成功;3驳回
|
||||
PoiAuditState []int64 `json:"poi_audit_state"`
|
||||
// 省
|
||||
Province string `json:"province"`
|
||||
// 市
|
||||
City string `json:"city"`
|
||||
// 区
|
||||
District string `json:"district"`
|
||||
// 门店poiId集合
|
||||
PoiIdList []int64 `json:"poi_id_list"`
|
||||
// 门店名称,支持模糊查询
|
||||
NameFuzzy string `json:"name_fuzzy"`
|
||||
// 门店编码,支持模糊查询
|
||||
StoreCodeFuzzy string `json:"store_code_fuzzy"`
|
||||
// 资质审核状态,0未提交;1审核中;2审核通过;3驳回
|
||||
QualState int64 `json:"qual_state"`
|
||||
// 账户验证状态,0未提交;1验证中;2通过;3失败
|
||||
RemitState int64 `json:"remit_state"`
|
||||
// 开户状态:0未开户;1已开户
|
||||
OpenAccountState int64 `json:"open_account_state"`
|
||||
// 是否需要poi审核信息,注:只要审核状态的审核不要传true,需要详细的提交信息时传true
|
||||
IsNeedPoiAuditInfo bool `json:"is_need_poi_audit_info"`
|
||||
// 是否需要关联的抖店信息,注:只要shopId不要传true,需要关联店铺名称等信息时传true
|
||||
IsNeedRelShopUser bool `json:"is_need_rel_shop_user"`
|
||||
//// 门店名称集合,不支持模糊
|
||||
//StoreNameList []string `json:"store_name_list"`
|
||||
//// 门店id集合,用于查询门店信息
|
||||
//StoreIdList []int64 `json:"store_id_list"`
|
||||
//// 门店编码,开发者自定义
|
||||
//StoreCodeList []string `json:"store_code_list"`
|
||||
//// 绑定状态,1绑定中;2绑定成功;3:资质验证中;4账户认证中;5正常营业(c端可下单)
|
||||
//State int64 `json:"state"`
|
||||
//// poi审核状态:0无提审;1审核中;2审核成功;3驳回
|
||||
//PoiAuditState []int64 `json:"poi_audit_state"`
|
||||
//// 省
|
||||
//Province string `json:"province"`
|
||||
//// 市
|
||||
//City string `json:"city"`
|
||||
//// 区
|
||||
//District string `json:"district"`
|
||||
//// 门店poiId集合
|
||||
//PoiIdList []int64 `json:"poi_id_list"`
|
||||
//// 门店名称,支持模糊查询
|
||||
//NameFuzzy string `json:"name_fuzzy"`
|
||||
//// 门店编码,支持模糊查询
|
||||
//StoreCodeFuzzy string `json:"store_code_fuzzy"`
|
||||
//// 资质审核状态,0未提交;1审核中;2审核通过;3驳回
|
||||
//QualState int64 `json:"qual_state"`
|
||||
//// 账户验证状态,0未提交;1验证中;2通过;3失败
|
||||
//RemitState int64 `json:"remit_state"`
|
||||
//// 开户状态:0未开户;1已开户
|
||||
//OpenAccountState int64 `json:"open_account_state"`
|
||||
//// 是否需要poi审核信息,注:只要审核状态的审核不要传true,需要详细的提交信息时传true
|
||||
//IsNeedPoiAuditInfo bool `json:"is_need_poi_audit_info"`
|
||||
//// 是否需要关联的抖店信息,注:只要shopId不要传true,需要关联店铺名称等信息时传true
|
||||
//IsNeedRelShopUser bool `json:"is_need_rel_shop_user"`
|
||||
// 第几页(从0开始)
|
||||
Page int64 `json:"page"`
|
||||
Page string `json:"page"`
|
||||
// 每页条数
|
||||
PageSize int64 `json:"page_size"`
|
||||
PageSize string `json:"page_size"`
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
shop_getStoreDetail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/response"
|
||||
shop_getStoreFreight_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreFreight/request"
|
||||
shop_getStoreList_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreList/request"
|
||||
shop_getStoreList_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreList/response"
|
||||
shop_getStoreSaleLimit_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreSaleLimit/request"
|
||||
shop_setStorePackageFee_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_setStorePackageFee/request"
|
||||
shop_storeSuspend_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_storeSuspend/request"
|
||||
@@ -142,8 +141,13 @@ func (a *API) UnsuspendStore(param *shop_unsuspendStore_request.ShopUnsuspendSto
|
||||
return response.Data, nil
|
||||
}
|
||||
|
||||
type VendorAndStoreId struct {
|
||||
StoreId string `json:"store_id"` //京西本地ID
|
||||
VendorStoreID int64 `json:"vendor_store_id"` //抖店平台ID
|
||||
}
|
||||
|
||||
//门店列表分页查询
|
||||
func (a *API) GetStoreList(param *shop_getStoreList_request.ShopGetStoreListParam) (*shop_getStoreList_response.ShopGetStoreListData, error) {
|
||||
func (a *API) GetStoreList(param *shop_getStoreList_request.ShopGetStoreListParam) (map[int64]string, error) {
|
||||
request := shop_getStoreList_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
@@ -155,7 +159,14 @@ func (a *API) GetStoreList(param *shop_getStoreList_request.ShopGetStoreListPara
|
||||
if response.Code != RequestSuccessCode {
|
||||
return nil, errors.New(response.SubMsg)
|
||||
}
|
||||
return response.Data, nil
|
||||
//测试用
|
||||
resp := map[int64]string{}
|
||||
if len(response.Data.StoreDetailList) > 0 {
|
||||
for _, v := range response.Data.StoreDetailList {
|
||||
resp[v.Store.StoreId] = v.Store.StoreCode
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
//创建限售规则模板
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request"
|
||||
shop_bindStoreSaleLimit_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_bindStoreSaleLimit/request"
|
||||
shop_editStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_editStore/request"
|
||||
shop_getStoreList_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreList/request"
|
||||
shop_storeSuspend_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_storeSuspend/request"
|
||||
shop_unsuspendStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_unsuspendStore/request"
|
||||
trade_createTradeLimitTemplate_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/trade_createTradeLimitTemplate/request"
|
||||
@@ -53,6 +54,18 @@ func TestCreateStore(t *testing.T) {
|
||||
fmt.Println("err==", err)
|
||||
}
|
||||
|
||||
//门店列表分页查询
|
||||
func TestGetStoreList(t *testing.T) {
|
||||
data, err := a.GetStoreList(&shop_getStoreList_request.ShopGetStoreListParam{
|
||||
Page: "1",
|
||||
PageSize: "20",
|
||||
})
|
||||
for _, v := range data {
|
||||
fmt.Println(v)
|
||||
}
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
func TestSysnc(t *testing.T) {
|
||||
fmt.Println((2 & 2) != 0) // 创建
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user