This commit is contained in:
苏尹岚
2020-09-27 13:55:31 +08:00
parent 8f93d2f8de
commit 49ef3ed9e0
4 changed files with 29 additions and 29 deletions

View File

@@ -5,10 +5,10 @@ import (
"git.rosy.net.cn/jx-callback/business/model"
)
func GetFunction(db *DaoDB, name string, level int) (functions []*model.Function, err error) {
func GetMenu(db *DaoDB, name string, level int) (menus []*model.Menu, err error) {
sql := `
SELECT *
FROM function
FROM menu
WHERE deleted_at = ?
`
sqlParams := []interface{}{
@@ -22,6 +22,6 @@ func GetFunction(db *DaoDB, name string, level int) (functions []*model.Function
sql += " AND level = ?"
sqlParams = append(sqlParams, level)
}
err = GetRows(db, &functions, sql, sqlParams)
return functions, err
err = GetRows(db, &menus, sql, sqlParams)
return menus, err
}