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