fusenapi/model/gmodel/ldap_menus_logic.go
2023-11-14 11:45:25 +08:00

16 lines
359 B
Go

package gmodel
import "context"
// TODO: 使用model的属性做你想做的
// 获取全部菜单
func (d *LdapMenusModel) GetAll(ctx context.Context) (resp []LdapMenus, err error) {
var menus []LdapMenus
result := d.db.Model(&LdapMenus{}).Where("status = ?", 1).Find(&menus)
if result.Error != nil {
return nil, result.Error
}
return menus, nil
}