/// <summary> /// 账号密码登录 /// </summary> /// <param name="account"></param> /// <param name="password"></param> /// <returns></returns> public virtual UserModel CheckLogin(string account, string password) { BaseUserEntity _entity = DataBaseUtils.GetUserEntity(account, password); CasLogEntity log = DataBaseUtils.casLoginLog(_entity); UserModel user = new UserModel(); user.UserId = _entity.UserId; user.Account = _entity.Account; user.Password = _entity.Password; user.UserName = _entity.RealName; user.Code = _entity.EnCode; user.LogTime = DateTime.Now; user.CasLogId = log == null ? "" : log.CasLogId; return(user); }
/// <summary> /// 根据账号获取用户 /// </summary> /// <param name="account"></param> /// <returns></returns> public virtual BaseUserEntity GetUserEntity(string account) { return(DataBaseUtils.GetUserEntity(account, null)); }