1
This commit is contained in:
@@ -22,8 +22,8 @@ func TestApi(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestQueryOrderDetail(t *testing.T) {
|
||||
token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
data, err := a.GetTiktokOrderDetail("4988546918828606694")
|
||||
globals.SugarLogger.Debugf("=====%s", utils.Format4Output(data, false))
|
||||
globals.SugarLogger.Debugf("=====%s", err)
|
||||
|
||||
@@ -43,7 +43,6 @@ func (a *API) UpdateSkuStock(param *sku_syncStock_request.SkuSyncStockParam) err
|
||||
if resp.Code != RequestSuccessCode {
|
||||
return errors.New(resp.Msg)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestCreateStoreCommodity(t *testing.T) {
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
param := &product_addV2_request.ProductAddV2Param{
|
||||
//ProductType: 0,
|
||||
CategoryLeafId: 23065,
|
||||
CategoryLeafId: 29146,
|
||||
ProductFormat: "",
|
||||
Name: "精华补水液-1",
|
||||
RecommendRemark: "商家推荐话术-1",
|
||||
@@ -80,7 +80,7 @@ func TestCreateStoreCommodity(t *testing.T) {
|
||||
//MaximumPerOrder: 0,
|
||||
//LimitPerBuyer: 0,
|
||||
//MinimumPerOrder: 0,
|
||||
//ProductFormatNew: "",
|
||||
//ProductFormatNew: "29146",
|
||||
//SpuId: 0,
|
||||
//AppointDeliveryDay: 0,
|
||||
//ThirdUrl: "",
|
||||
@@ -236,8 +236,8 @@ func TestGetSkuDetailLocalId(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateSkuStore(t *testing.T) {
|
||||
token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
err := a.UpdateSkuStock(&sku_syncStock_request.SkuSyncStockParam{
|
||||
SkuId: 1746278107578416,
|
||||
ProductId: 3576377564144516403,
|
||||
@@ -266,8 +266,8 @@ func TestEiduPrice(t *testing.T) {
|
||||
|
||||
// s上架1
|
||||
func TestEditStoreCommodity(t *testing.T) {
|
||||
token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
||||
ProductId: 3576377564144516403,
|
||||
Commit: true,
|
||||
|
||||
@@ -21,10 +21,10 @@ func init() {
|
||||
}
|
||||
|
||||
func TestCreateFolad(t *testing.T) {
|
||||
accesstoken := `{"access_token":"6c4d71b3-831c-4a96-8d2e-977e37afba5a","expires_in":604800,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"65aae144-4cc0-44d2-89ba-5d3062caca41","authority_id":""}
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}
|
||||
`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
data, err := a.CreateFolder("")
|
||||
data, err := a.CreateFolder("测试创建文件夹1019")
|
||||
fmt.Println("err=====", err)
|
||||
fmt.Println("LogId====", data.LogId) //2022092811422001020812109607601B77
|
||||
fmt.Println("data====", data.Data.Name) // jxcs_folder
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
shop_bindStoreFreight_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_bindStoreFreight/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_editStore_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_editStore/response"
|
||||
shop_getStoreDetail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/request"
|
||||
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"
|
||||
@@ -81,18 +80,18 @@ func (a *API) BatchCreateStore(param *shop_batchCreateStore_request.ShopBatchCre
|
||||
}
|
||||
|
||||
// EditStore 编辑门店
|
||||
func (a *API) EditStore(param *shop_editStore_request.ShopEditStoreParam) (*shop_editStore_response.ShopEditStoreData, error) {
|
||||
func (a *API) EditStore(param *shop_editStore_request.ShopEditStoreParam) error {
|
||||
globals.SugarLogger.Debugf("EditStore EditStore:%s", utils.Format4Output(param, true))
|
||||
request := shop_editStore_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
if response.Code != RequestSuccessCode {
|
||||
return nil, errors.New(response.SubMsg)
|
||||
return errors.New(response.SubMsg)
|
||||
}
|
||||
return response.Data, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
//暂停营业
|
||||
|
||||
@@ -4,6 +4,9 @@ import (
|
||||
"fmt"
|
||||
freightTemplate_create_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/freightTemplate_create/request"
|
||||
shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request"
|
||||
shop_editStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_editStore/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"
|
||||
warehouse_bindFences_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindFences/request"
|
||||
warehouse_bindFencesByStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindFencesByStore/request"
|
||||
warehouse_bindStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindStore/request"
|
||||
@@ -181,3 +184,47 @@ func TestWarehouseBindFence(t *testing.T) {
|
||||
func TestJNTM(t *testing.T) {
|
||||
fmt.Println(2 | 8)
|
||||
}
|
||||
|
||||
func TestStoreSuspend(t *testing.T) {
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
param := &shop_storeSuspend_request.ShopStoreSuspendParam{
|
||||
StoreId: 65312663,
|
||||
}
|
||||
resp, err := a.StoreSuspend(param)
|
||||
fmt.Println(resp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
func TestUnsuspendStore(t *testing.T) {
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
param := &shop_unsuspendStore_request.ShopUnsuspendStoreParam{
|
||||
StoreId: 65312663,
|
||||
}
|
||||
resp, err := a.UnsuspendStore(param)
|
||||
fmt.Println(resp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
func TestUpdateStore(t *testing.T) {
|
||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
param := &shop_editStore_request.ShopEditStoreParam{
|
||||
StoreId: 65312663,
|
||||
StoreCode: "",
|
||||
Name: "测试门店修改1019",
|
||||
Province: "",
|
||||
City: "",
|
||||
District: "",
|
||||
Address: "",
|
||||
Contact: "",
|
||||
Longitude: "",
|
||||
Latitude: "",
|
||||
OpenTime: &shop_editStore_request.OpenTime{DayMap: map[int64]string{
|
||||
1: "07:00-12:00 14:00-18:00",
|
||||
}},
|
||||
}
|
||||
err := a.EditStore(param)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user