This commit is contained in:
suyl
2021-09-06 10:49:12 +08:00
parent f5f8bdb199
commit 46f705278f
6 changed files with 76 additions and 11 deletions

View File

@@ -990,7 +990,7 @@ func GetStoreAuditPage(db *DaoDB, statuss []int, keyword string, applyTimeStart,
return pagedInfo, err
}
func GetBrands(db *DaoDB, name string, brandID int) (brands []*model.Brand, err error) {
func GetBrands(db *DaoDB, name string, brandID int, poolKey string) (brands []*model.Brand, err error) {
sql := `
SELECT *
FROM brand
@@ -1007,6 +1007,10 @@ func GetBrands(db *DaoDB, name string, brandID int) (brands []*model.Brand, err
sql += " AND id = ?"
sqlParams = append(sqlParams, brandID)
}
if poolKey != "" {
sql += " AND secret_number_pool_key = ?"
sqlParams = append(sqlParams, poolKey)
}
err = GetRows(db, &brands, sql, sqlParams)
return brands, err
}