/// <summary> /// 获取所有在线用户 /// </summary> /// <returns></returns> public virtual IDictionary <string, UserModel> GetAllOnLines() { try { RedisCacheUtils.Select(1); IEnumerable <string> keys = RedisCacheUtils.GetAllKey(); if (keys.ToJson().Equals("[]")) { return(null); } IDictionary <string, UserModel> users = RedisCacheUtils.GetAll <UserModel>(keys); return(users); } catch (Exception ex) { LogUtils.myError(log, ex); throw ex; } }