using Dapper; using Znyc.Recruitment.Admin.Commons.IDbContext; using Znyc.Recruitment.Admin.Commons.Repositories; using Znyc.Recruitment.Admin.Security.Entitys; using Znyc.Recruitment.Admin.Security.IRepositories; namespace Znyc.Recruitment.Admin.Security.Repositories { public class AdminUserLogOnRepository : BaseRepository, IAdminUserLogOnRepository { public AdminUserLogOnRepository() { } public AdminUserLogOnRepository(IDbContextCore dbContext) : base(dbContext) { } /// /// 根据会员ID获取用户登录信息实体 /// /// /// public AdminUserLogOnEntity GetByUserId(long userId) { string sql = @"SELECT * FROM sys_adminuser_logon t WHERE t.UserId = @UserId"; return DapperConn.QueryFirstOrDefault(sql, new { UserId = userId }); } } }