1
This commit is contained in:
@@ -305,33 +305,33 @@ var (
|
||||
type Store struct {
|
||||
ModelIDCULD
|
||||
|
||||
RowID int64 `json:"rowID"` //标识这条数据(抖店用)
|
||||
StoreCode string `json:"storeCode"` //门店编码(抖店用)
|
||||
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 ?
|
||||
DistrictCode int `orm:"default(0);null" json:"districtCode"` // todo ?
|
||||
Address string `orm:"size(255)" json:"address"`
|
||||
Tel1 string `orm:"size(32);index" json:"tel1"`
|
||||
Tel2 string `orm:"size(32);index" json:"tel2"`
|
||||
OpenTime1 int16 `json:"openTime1" validate:"max=2359,min=1,ltfield=CloseTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int16 `json:"closeTime1" validate:"max=2359,min=1` // 格式同上
|
||||
OpenTime2 int16 `json:"openTime2" validate:"max=2359,min=1,ltfield=CloseTime2"` // 格式同上
|
||||
CloseTime2 int16 `json:"closeTime2" validate:"max=2359,min=1` // 格式同上
|
||||
Lng int `json:"-"` // 乘了10的6次方
|
||||
Lat int `json:"-"` // 乘了10的6次方
|
||||
DeliveryRangeType int8 `json:"deliveryRangeType"` // 参见相关常量定义
|
||||
DeliveryRange string `orm:"type(text)" json:"deliveryRange"` // 如果DeliveryRangeType为DeliveryRangeTypePolygon,则为逗号分隔坐标,分号分隔的坐标点(坐标与Lng和Lat一样,都是整数),比如 121361504,31189308;121420555,31150238。否则为半径,单位为米
|
||||
Status int `json:"status"`
|
||||
AutoEnableAt *time.Time `orm:"type(datetime);null" json:"autoEnableAt"` // 自动营业时间(临时休息用)
|
||||
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
|
||||
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息(每天只推一条)
|
||||
SMSNotifyMark int8 `orm:"column(sms_notify_mark);" json:"smsNotifyMark"` //今天是否已经推送过订单消息
|
||||
AutoReplyType int8 `json:"autoReplyType"` // 订单评价自动回复类型
|
||||
LinkStoreID int `orm:"column(link_store_id);default(0);index" json:"linkStoreID"` // 关联门店ID
|
||||
StoreLevel string `orm:"default(C);size(32)" json:"storeLevel"` // 门店等级(筛选用,京西的)
|
||||
Comment string `orm:"size(255)" json:"comment"` //门店备注
|
||||
RowID int64 `json:"rowID"` //标识这条数据(抖店用)
|
||||
StoreCode string `json:"storeCode"` //门店编码(抖店用)
|
||||
//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 ?
|
||||
DistrictCode int `orm:"default(0);null" json:"districtCode"` // todo ?
|
||||
Address string `orm:"size(255)" json:"address"`
|
||||
Tel1 string `orm:"size(32);index" json:"tel1"`
|
||||
Tel2 string `orm:"size(32);index" json:"tel2"`
|
||||
OpenTime1 int16 `json:"openTime1" validate:"max=2359,min=1,ltfield=CloseTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int16 `json:"closeTime1" validate:"max=2359,min=1` // 格式同上
|
||||
OpenTime2 int16 `json:"openTime2" validate:"max=2359,min=1,ltfield=CloseTime2"` // 格式同上
|
||||
CloseTime2 int16 `json:"closeTime2" validate:"max=2359,min=1` // 格式同上
|
||||
Lng int `json:"-"` // 乘了10的6次方
|
||||
Lat int `json:"-"` // 乘了10的6次方
|
||||
DeliveryRangeType int8 `json:"deliveryRangeType"` // 参见相关常量定义
|
||||
DeliveryRange string `orm:"type(text)" json:"deliveryRange"` // 如果DeliveryRangeType为DeliveryRangeTypePolygon,则为逗号分隔坐标,分号分隔的坐标点(坐标与Lng和Lat一样,都是整数),比如 121361504,31189308;121420555,31150238。否则为半径,单位为米
|
||||
Status int `json:"status"`
|
||||
AutoEnableAt *time.Time `orm:"type(datetime);null" json:"autoEnableAt"` // 自动营业时间(临时休息用)
|
||||
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
|
||||
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息(每天只推一条)
|
||||
SMSNotifyMark int8 `orm:"column(sms_notify_mark);" json:"smsNotifyMark"` //今天是否已经推送过订单消息
|
||||
AutoReplyType int8 `json:"autoReplyType"` // 订单评价自动回复类型
|
||||
LinkStoreID int `orm:"column(link_store_id);default(0);index" json:"linkStoreID"` // 关联门店ID
|
||||
StoreLevel string `orm:"default(C);size(32)" json:"storeLevel"` // 门店等级(筛选用,京西的)
|
||||
Comment string `orm:"size(255)" json:"comment"` //门店备注
|
||||
|
||||
PrinterDisabled int8 `orm:"default(0)" json:"printerDisabled"` // 是否禁用网络打印机
|
||||
PrinterFontSize int8 `orm:"default(0)" json:"printerFontSize"` // 打印字体0:(正常大小1份),1:(大字体一份),2(正常字体两份),3(打字体两份)
|
||||
|
||||
@@ -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