This commit is contained in:
suyl
2021-05-24 17:08:45 +08:00
parent 711885373a
commit 7ea090ec1b
5 changed files with 9 additions and 9 deletions

View File

@@ -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
}

View File

@@ -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) {