/// <summary> /// 获取最新的站内信 /// </summary> /// <param name="receiverID"></param> /// <param name="count"></param> /// <returns></returns> public List <MessageModel> GetTopMessage(string receiverID, int count = 100) { var mdal = new MessageDal(); var list = mdal.QueryList(where : x => x.ReceiverUserID == receiverID, orderby: x => x.UpdateTime, Desc: true, start: 0, count: count); return(list); }
/// <summary> /// 获取最新的站内信 /// </summary> /// <param name="receiverID"></param> /// <param name="count"></param> /// <returns></returns> public List <MessageModel> GetTopMessage(int receiverID, int count = 100) { string key = "topmessage,uid:" + receiverID + "count:" + count; return(Cache(key, () => { var mdal = new MessageDal(); var list = mdal.QueryList(where : x => x.ReceiverUserID == receiverID, orderby: x => x.UpdateTime, Desc: true, start: 0, count: count); return list; })); }