123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using GxPress.Request.App.Group;
- using GxPress.Result.App.Group;
- using GxPress.Result.App.GroupUser;
- using Datory;
- using GxPress.Entity;
- using GxPress.Request.App.Topic;
- using GxPress.Result.Job;
- using GxPress.Common.Page;
- namespace GxPress.Repository.Interface
- {
- public interface IGroupRepository : IRepository
- {
- Task<int> InsertAsync(GroupInRequest request);
- Task<bool> UpdateAsync(GroupUpRequest request);
- Task<bool> DeleteAsync(int id);
- Task<bool> DeleteAsync(SqlKata.Query query);
- Task<PagedList<GroupUserFindResult>> FindGroupByGroupFolderId(GroupSearchRequest request);
- Task<GroupDetailResult> GroupDetailAsync(GroupDetailRequest request);
- /// <summary>
- /// 获取用户未读取话题数量
- /// </summary>
- /// <param name="userId"></param>
- /// <param name="groupId"></param>
- /// <returns></returns>
- Task<int> GetUReadCountAsync(int userId, int groupId);
- /// <summary>
- /// 获取小组的共享话题数量
- /// </summary>
- /// <param name="groupId"></param>
- /// <returns></returns>
- Task<int> SharingCountAsync(int groupId);
- Task<Entity.Group> GetAsync(int id);
- /// <summary>
- /// 是否免打扰
- /// </summary>
- /// <param name="groupId"></param>
- /// <returns></returns>
- Task<bool> SetGroupIsAdminAsync(int groupId);
- /// <summary>
- /// 是否禁言
- /// </summary>
- /// <param name="groupId"></param>
- /// <returns></returns>
- Task<bool> SetGroupIsWordsAsync(int groupId);
- /// <summary>
- /// 获取小组详情
- /// </summary>
- /// <param name="guId"></param>
- /// <returns></returns>
- Task<GroupDetailResult> GroupDetailByGuIdAsync(string guId, int userId);
- Task<IEnumerable<GroupUser>> GetAllAsync(SqlKata.Query query);
- /// <summary>
- /// 搜索小组成员
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<IEnumerable<GroupUserListResult>> SearchGroupUserAsync(TopicDetailListRequest request);
- Task<List<JobGroupResult>> ElasticSearchGroup();
- /// <summary>
- /// 根据广场类别查询小组
- /// </summary>
- /// <param name="categoryId"></param>
- /// <returns></returns>
- Task<IEnumerable<SearchGroupDetailResult>> GetAllAsync(int categoryId, int userId);
- /// <summary>
- /// 用户小组列表
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<IEnumerable<UserGroupList>> GetAllByUserIdAsync(int userId);
- /// <summary>
- /// 或者最近使用的小组
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<IEnumerable<LatelyGroupDetailResult>> GetLatelyGroupDetailResultAsync(int userId);
- /// <summary>
- /// 小组列表 搜索专用
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<IEnumerable<UserGroupResult>> GetUserGroupListAsync(int userId);
- /// <summary>
- /// 修改小组
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<bool> UpdateAsync(Entity.Group group);
- /// <summary>
- /// 获取小组列表
- /// </summary>
- /// <returns></returns>
- Task<IEnumerable<GroupDetailResult>> GetGroupDetailResults(string keyWor);
- /// <summary>
- /// 小组广场搜索
- /// </summary>
- /// <param name="keyWord"></param>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<IEnumerable<SearchGroupDetailResult>> GetSearchGroupAsync(string keyWord, int userId);
- /// <summary>
- /// 是否添加到通讯录
- /// </summary>
- /// <param name="groupId"></param>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<bool> UpdateContactsAsync(int groupId, int userId);
- }
- }
|