Security/Yuebon.Security.Repositories/TenantLogonRepository.cs

(完整代码) 771B

namespace Yuebon.Security.Repositories
{
    /// <summary>
    /// 用户登录信息仓储接口的实现
    /// </summary>
    public class TenantLogonRepository : BaseRepository<TenantLogon>, ITenantLogonRepository
    {

        public TenantLogonRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
        {

        }

        /// <summary>
        /// 根据租户ID获取租户登录信息实体
        /// </summary>
        /// <param name="tenantId"></param>
        /// <returns></returns>
        public TenantLogon GetByTenantId(long tenantId)
        {
            string sql = $"SELECT * FROM {this.tableName} t WHERE t.TenantId = @TenantId";
            return Db.Ado.SqlQuerySingle<TenantLogon>(sql, new { @TenantId = tenantId });
        }

    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。