1
This commit is contained in:
@@ -307,7 +307,7 @@ type Store struct {
|
||||
|
||||
RowID int64 `json:"rowID"` //标识这条数据(抖店用)
|
||||
StoreCode string `json:"storeCode"` //门店编码(抖店用)
|
||||
OpenTime map[int64]string `json:"openTime"` //营业时间(抖店用)
|
||||
//OpenTime map[int64]string `json:"openTime"` //营业时间(抖店用)
|
||||
OriginalName string `orm:"-" json:"originalName"`
|
||||
Name string `orm:"size(255)" json:"name"`
|
||||
CityCode int `orm:"default(0);null" json:"cityCode"` // todo ?
|
||||
|
||||
@@ -1,36 +1,28 @@
|
||||
package doudian
|
||||
|
||||
import (
|
||||
shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCreateStore(t *testing.T) {
|
||||
accesstoken := `{"access_token":"90868a42-1287-4453-ba71-34c72f22e886","expires_in":555553,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"4e8cf946-8df1-4489-be88-f96f2d4603a8","authority_id ":""}`
|
||||
tiktok_api.New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
request := shop_batchCreateStore_request.New()
|
||||
//storeList := make([]*shop_batchCreateStore_request.StoreListItem, 0)
|
||||
storeInfo := model.Store{
|
||||
RowID: int64(2),
|
||||
Name: "京西菜市小时达测试店铺0921",
|
||||
StoreCode: "666667",
|
||||
Lng: utils.Str2Int("119.441741"),
|
||||
Lat: utils.Str2Int("32.133087"),
|
||||
Address: "金牛区二环路北一段10号",
|
||||
Tel1: "17358644830",
|
||||
OpenTime: map[int64]string{1: "07:00-19:00", 2: "8:00-19:00"},
|
||||
}
|
||||
list := &dao.StoreDetail{}
|
||||
list.Store = storeInfo
|
||||
list.ProvinceName = "四川省"
|
||||
list.CityName = "成都市"
|
||||
list.DistrictName = "金牛区"
|
||||
_, err := CurPurchaseHandler.CreateStore2(nil, 0, "", nil, list)
|
||||
resp, err := request.Execute(tiktok_api.AccessToken)
|
||||
t.Fatal("err===========", err)
|
||||
t.Fatalf("resp===========:%v", resp)
|
||||
}
|
||||
//
|
||||
//func TestCreateStore(t *testing.T) {
|
||||
// accesstoken := `{"access_token":"90868a42-1287-4453-ba71-34c72f22e886","expires_in":555553,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"4e8cf946-8df1-4489-be88-f96f2d4603a8","authority_id ":""}`
|
||||
// tiktok_api.New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
// request := shop_batchCreateStore_request.New()
|
||||
// //storeList := make([]*shop_batchCreateStore_request.StoreListItem, 0)
|
||||
// storeInfo := model.Store{
|
||||
// RowID: int64(2),
|
||||
// Name: "京西菜市小时达测试店铺0921",
|
||||
// StoreCode: "666667",
|
||||
// Lng: utils.Str2Int("119.441741"),
|
||||
// Lat: utils.Str2Int("32.133087"),
|
||||
// Address: "金牛区二环路北一段10号",
|
||||
// Tel1: "17358644830",
|
||||
// OpenTime: map[int64]string{1: "07:00-19:00", 2: "8:00-19:00"},
|
||||
// }
|
||||
// list := &dao.StoreDetail{}
|
||||
// list.Store = storeInfo
|
||||
// list.ProvinceName = "四川省"
|
||||
// list.CityName = "成都市"
|
||||
// list.DistrictName = "金牛区"
|
||||
// _, err := CurPurchaseHandler.CreateStore2(nil, 0, "", nil, list)
|
||||
// resp, err := request.Execute(tiktok_api.AccessToken)
|
||||
// t.Fatal("err===========", err)
|
||||
// t.Fatalf("resp===========:%v", resp)
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user