- up
This commit is contained in:
@@ -77,6 +77,52 @@ type ShopInfo struct {
|
||||
OrderStatusPush int `json:"order_status_push"`
|
||||
}
|
||||
|
||||
type BussinessTimeInfo struct {
|
||||
End string `json:"end"`
|
||||
Start string `json:"start"`
|
||||
}
|
||||
|
||||
type ShopDetail struct {
|
||||
Address string `json:"address"`
|
||||
BaiduShopID int64 `json:"baidu_shop_id"`
|
||||
BookAheadTime int `json:"book_ahead_time"`
|
||||
Brand string `json:"brand"`
|
||||
BusinessFormID string `json:"business_form_id"`
|
||||
BusinessTime []*BussinessTimeInfo `json:"business_time"`
|
||||
Category1 string `json:"category1"`
|
||||
Category2 string `json:"category2"`
|
||||
Category3 string `json:"category3"`
|
||||
Categorys []struct {
|
||||
Category1 string `json:"category1"`
|
||||
Category2 string `json:"category2"`
|
||||
} `json:"categorys"`
|
||||
City string `json:"city"`
|
||||
CoordType string `json:"coord_type"`
|
||||
County string `json:"county"`
|
||||
DeliveryParty int `json:"delivery_party"`
|
||||
DeliveryRegion []interface{} `json:"delivery_region"`
|
||||
DeliveryType string `json:"delivery_type"`
|
||||
InvoiceSupport string `json:"invoice_support"`
|
||||
IvrPhone string `json:"ivr_phone"`
|
||||
Latitude float64 `json:"latitude"`
|
||||
Longitude float64 `json:"longitude"`
|
||||
MinOrderPrice string `json:"min_order_price"`
|
||||
Name string `json:"name"`
|
||||
OrderPush int `json:"order_push"`
|
||||
OrderStatusPush int `json:"order_status_push"`
|
||||
PackageBoxPrice int `json:"package_box_price"`
|
||||
Phone string `json:"phone"`
|
||||
PickTime string `json:"pick_time"`
|
||||
Province string `json:"province"`
|
||||
ServicePhone string `json:"service_phone"`
|
||||
ServicePhones []string `json:"service_phones"`
|
||||
ShopID string `json:"shop_id"`
|
||||
ShopLogo string `json:"shop_logo"`
|
||||
Status string `json:"status"`
|
||||
SupplierID int64 `json:"supplier_id"`
|
||||
SupplierName string `json:"supplier_name"`
|
||||
}
|
||||
|
||||
func (a *API) genShopIDParams(shopID string, baiduShopID, supplierID int64) map[string]interface{} {
|
||||
// if shopID == "" && baiduShopID == 0 || shopID != "" && baiduShopID != 0 {
|
||||
// panic("shopID and baiduShopID can not all be empty or all not be empty")
|
||||
@@ -139,6 +185,14 @@ func (a *API) ShopGet(shopID string, baiduShopID int64) (shop map[string]interfa
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a *API) ShopGet2(shopID string, baiduShopID int64) (shopDetail *ShopDetail, err error) {
|
||||
result, err := a.ShopGet(shopID, baiduShopID)
|
||||
if err == nil {
|
||||
err = utils.Map2StructByJson(result, &shopDetail, true)
|
||||
}
|
||||
return shopDetail, err
|
||||
}
|
||||
|
||||
func (a *API) ShopUpdate(params map[string]interface{}) (err error) {
|
||||
_, err = a.AccessAPI("shop.update", params)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user