This commit is contained in:
suyl
2021-09-06 13:35:29 +08:00
parent 6222a7bf61
commit 258aa7acb2
4 changed files with 97 additions and 6 deletions

View File

@@ -1433,3 +1433,15 @@ func GetBrandCategoryMap(db *DaoDB, parentID, level, brandID, categoryID int) (b
}
return brandCatMaps, err
}
func GetBrandSecretNumbers(db *DaoDB, brandID int) (results []*model.SecretNumber, err error) {
sql := `
SELECT a.*
FROM secret_number a
LEFT JOIN brand b ON a.pool_key = b.pool_key
WHERE b.deleted_at = ? AND b.id = ?
`
sqlParams := []interface{}{utils.DefaultTimeValue, brandID}
err = GetRows(db, &results, sql, sqlParams)
return results, err
}