Files
baseapi/platformapi/jdshopapi/store.go
2020-05-12 15:37:04 +08:00

27 lines
1.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package jdshopapi
import (
"git.rosy.net.cn/baseapi/utils"
)
type CreateEntityStoreParam struct {
Name string `json:"name"` //是 门店名称
AddCode int `json:"addCode"` //是 门店三级标准地址编码(京东)
AddCodeName string `json:"addCodeName"` //否 门店三级标准地址名称(京东)
AddName string `json:"addName"` //是 标准地址加扩展地址以@!分隔 必填 例:北京大兴区亦庄经济开发区@!京东大厦
Coordinate string `json:"coordinate"` //是 门店坐标 纬度在前,经度在后 例39.786683,116.563075
Phone string `json:"phone"` //是 门店电话
Item []int `json:"item"` //否 门店组ID
CustomerId string `json:"customerId"` //否 商家门店Id商家维度不可重复
CategoryName string `json:"categoryName"` //否 门店扩展属性类目名称固定填为popmendianSelfdelivery
ExtendJson string `json:"extendJson"` //是 扩展属性JSON如{name1'value1',name2:'value2'},营业时间必传固定json格式{\'businessBeginTime\':\'09:00\',\'businessEndTime\':\'22:00\'}' ,可将中间的时间变更
ImageFile []byte `json:"imageFile"` //否 门店图片,图片二进制文件流允许png、jpg、gif、jpeg、bmp图片格式1M以内。
}
//创建门店
//https://open.jd.com/home/home#/doc/api?apiCateId=351&apiId=2224&apiName=jingdong.createEntityStore
func (a *API) CreateEntityStore(createEntityStoreParam *CreateEntityStoreParam) (err error) {
_, err = a.AccessAPI("jingdong.createEntityStore", prodURL, utils.Struct2FlatMap(createEntityStoreParam))
return err
}