//-----------------------------------------------------------------------
// <copyright file=" sys_menu.cs">
// * FileName: sys_menu.cs
// * history : Created by T4 2019-03-05 16:58:02 
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
using System.Collections.Generic;
using System.Linq;

namespace Performance.Repository
{
    /// <summary>
    /// sys_menu Repository
    /// </summary>
    public partial class PerforMenuRepository : PerforRepository<sys_menu>
    {

        public List<sys_menu> GetMenuList(int userid)
        {
            string sql = @"select sm.* from sys_user_role sur join sys_role_menu srm on sur.roleid = srm.roleid	join sys_menu sm on srm.menuid = sm.id where sur.userid=@userid and sm.states=1";
            return DapperQuery(sql, new { userid }).ToList();
        }
    }
}
