招聘后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
1007 B

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<AdminUserLogOnEntity, long>, IAdminUserLogOnRepository
{
public AdminUserLogOnRepository()
{
}
public AdminUserLogOnRepository(IDbContextCore dbContext) : base(dbContext)
{
}
/// <summary>
/// 根据会员ID获取用户登录信息实体
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public AdminUserLogOnEntity GetByUserId(long userId)
{
string sql = @"SELECT * FROM sys_adminuser_logon t WHERE t.UserId = @UserId";
return DapperConn.QueryFirstOrDefault<AdminUserLogOnEntity>(sql, new { UserId = userId });
}
}
}