Esempio n. 1
0
        /// <summary>
        /// 获取消息分页信息
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="toUserId"></param>
        /// <param name="iDisplayStart"></param>
        /// <param name="iDisplayLength"></param>
        /// <param name="time"></param>
        /// <returns></returns>
        public List <MessageList> GetMeaasgeList(string userId, string toUserId, int iDisplayStart, int iDisplayLength, DateTime?time)
        {
            var messageList = new List <MessageList>();
            var list        = _crmEvaMstrRepository.GetMeaasegePagList(userId, toUserId, iDisplayStart, iDisplayLength, time).Data;

            if (list.Count > 0)
            {
                foreach (var item in list)
                {
                    messageList.Add(new MessageList
                    {
                        userId         = item.EVA_REF_NO,
                        userName       = item.UDF2,
                        userUrl        = GetWxUrl(item.EVA_REF_NO),
                        toUserId       = item.EVA_OBJ_NO,
                        toUserName     = item.EVA_OBJ_NAME,
                        toUserUrl      = GetWxUrl(item.EVA_OBJ_NO),
                        MessageContent = item.EVA_CONTENT,
                        MessageDate    = Convert.ToDateTime(item.CREATE_DATE.ToString()).ToString("yyyy/MM/dd HH:mm:ss"),
                        brandId        = item.BRAND_ID,
                        brandName      = item.BRAND_NAME,
                        classId        = item.CLASS_ID,
                        className      = item.CLASS_NAME,
                        carTypeId      = item.CAR_TYPE_ID,
                        carTypeName    = item.CAR_TYPE_NAME
                    });
                }
            }
            return(messageList);
        }