using ce.autofac.extension; using learun.iapplication; using learun.util; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace learun.application { /// /// 版 本 EasyCode EC管理后台 /// Copyright (c) 2019-present EC管理有限公司 /// 创建人:tobin /// 日 期:2019.11.05 /// 描 述:即时通讯消息内容 /// public class IMMsgBLL : BLLBase, IMMsgIBLL, BLL { private readonly IMMsgService iMMsgService = new IMMsgService(); #region 获取数据 /// /// 获取列表数据(最近的10条聊天记录) /// /// public Task> GetList(string sendUserId, string recvUserId) { return iMMsgService.GetList(sendUserId, recvUserId); } /// /// 获取列表数据(小于某个时间点的5条记录) /// /// 我的ID /// 对方的ID /// 时间 /// public Task> GetListByTime(string myUserId, string otherUserId, DateTime time) { return iMMsgService.GetListByTime(myUserId, otherUserId, time); } /// /// 获取列表数据(大于某个时间的所有数据) /// /// 我的ID /// 对方的ID /// 时间 /// public Task> GetListByTime2(string myUserId, string otherUserId, DateTime time) { return iMMsgService.GetListByTime2(myUserId, otherUserId, time); } /// /// 获取列表分页数据 /// /// 分页参数 /// /// /// /// public Task> GetPageList(Pagination pagination, string sendUserId, string recvUserId, string keyword) { return iMMsgService.GetPageList(pagination, sendUserId, recvUserId, keyword); } #endregion 获取数据 #region 提交数据 /// /// 删除实体数据 /// /// 主键 /// public async Task DeleteEntity(string keyValue) { await iMMsgService.DeleteEntity(keyValue); } /// /// 保存实体数据(新增) /// /// 实体 /// public async Task SaveEntity(IMMsgEntity entity) { await iMMsgService.SaveEntity(entity); } #endregion 提交数据 } }