aa
This commit is contained in:
@@ -254,7 +254,7 @@ func (a *API) QueryPageBrandInfo(pageNo, pageSize int, brandId int64, brandName
|
||||
if brandId != 0 {
|
||||
params[KeyBrandId] = brandId
|
||||
}
|
||||
if brandName == "" {
|
||||
if brandName != "" {
|
||||
params[KeyBrandName] = brandName
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ import (
|
||||
)
|
||||
|
||||
func TestQueryPageBrandInfo(t *testing.T) {
|
||||
result, _, err := api.QueryPageBrandInfo(0, 0, 0, "")
|
||||
result, _, err := api.QueryPageBrandInfo(0, 0, 0, "京西")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(result) == 0 {
|
||||
t.Fatal("QueryPageBrandInfo brand list is empty!")
|
||||
}
|
||||
// baseapi.SugarLogger.Debug(result[0])
|
||||
baseapi.SugarLogger.Debug(utils.Format4Output(result, false), err)
|
||||
}
|
||||
|
||||
func TestQueryCategoriesByOrgCode(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"math"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -200,8 +199,8 @@ func TestUpdateBasic(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateExpand(t *testing.T) {
|
||||
str := "https://wx.jxc4.com/jxcsRegist?mobile=15520595380"
|
||||
fmt.Println(str[:strings.LastIndex(str, "?")])
|
||||
data, _, _ := DownloadFileByURL("http://image.jxc4.com/image/ac6c79112a0330006b40af3302df9f46.jpg")
|
||||
fmt.Println(string(data))
|
||||
}
|
||||
|
||||
func TestCreateGisFence(t *testing.T) {
|
||||
|
||||
@@ -33,6 +33,7 @@ const (
|
||||
|
||||
MsgTypeStoreStatusChanged = "storeStatusChanged"
|
||||
MsgTypeStoreAuditStatusChanged = "storeAuditStatusChanged"
|
||||
MsgTypeSkuDelete = "skuDelete"
|
||||
)
|
||||
|
||||
type CallbackResponse struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestRetailCatList(t *testing.T) {
|
||||
result, err := api.RetailCatList(testPoiCode)
|
||||
result, err := api.RetailCatList("11655829")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func TestRetailCatDelete(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRetailList(t *testing.T) {
|
||||
result, err := api.RetailList("9000444", 0, 20)
|
||||
result, err := api.RetailList("11655829", 0, 20)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func TestRetailList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRetailListAll(t *testing.T) {
|
||||
result, err := api.RetailListAll("9325917")
|
||||
result, err := api.RetailListAll("11655829")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user