aa
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package ebaiapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
@@ -185,7 +187,11 @@ func (a *API) ShopList( /*orderPush, orderStatusPush, status, */ sysStatus int)
|
||||
func (a *API) ShopCreate(params map[string]interface{}) (baiduShopID int64, err error) {
|
||||
result, err := a.AccessAPI("shop.create", params)
|
||||
if err == nil {
|
||||
return utils.MustInterface2Int64(result.Data.(map[string]interface{})[KeyBaiduShopID]), nil
|
||||
if result.Data != nil {
|
||||
return utils.MustInterface2Int64(result.Data.(map[string]interface{})[KeyBaiduShopID]), nil
|
||||
} else {
|
||||
return 0, fmt.Errorf(result.Error)
|
||||
}
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
@@ -296,3 +302,12 @@ func (a *API) ShopAnnouncementSet(shopID string, baiduShopID int64, content stri
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *API) ShopAptitudeUpload(shopID string, baiduShopID int64, params map[string]interface{}) (err error) {
|
||||
params2 := a.genShopIDParams(shopID, baiduShopID, 0)
|
||||
_, err = a.AccessAPI("shop.aptitude.upload", utils.MergeMaps(params, params2))
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user