IGroupChatUserRepository.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Threading.Tasks;
  5. using GxPress.Entity;
  6. using GxPress.Request.GroupChat;
  7. using GxPress.Request.GroupChatUser;
  8. using GxPress.Result.GroupChatUser;
  9. using Datory;
  10. namespace GxPress.Repository.Interface
  11. {
  12. public interface IGroupChatUserRepository : IRepository
  13. {
  14. /// <summary>
  15. /// 添加
  16. /// </summary>
  17. /// <param name="request"></param>
  18. /// <returns></returns>
  19. Task<bool> InsertAsync(GroupChatUserInRequest request);
  20. Task<int> InsertAsync(Entity.GroupChatUser groupChatUser);
  21. /// <summary>
  22. /// 修改
  23. /// </summary>
  24. /// <param name="request"></param>
  25. /// <returns></returns>
  26. Task<bool> UpdateAsync(GroupChatUserUpRequest request);
  27. /// <summary>
  28. /// 删除
  29. /// </summary>
  30. /// <param name="id"></param>
  31. /// <returns></returns>
  32. Task<bool> DeleteAsync(int id);
  33. /// <summary>
  34. /// 根据群ID查询群
  35. /// </summary>
  36. /// <param name="request"></param>
  37. /// <returns></returns>
  38. Task<IEnumerable<GroupChatUserByGroupChatIdResult>> GetGroupChatUserByGroupChatIdAsync(GroupChatUserSearchRequest request);
  39. /// <summary>
  40. /// 是否免打扰
  41. /// </summary>
  42. /// <param name="request"></param>
  43. /// <returns></returns>
  44. Task<bool> UpIsDisturbAsync(GroupChatUserIsDisturbRequest request);
  45. /// <summary>
  46. /// 是否置顶
  47. /// </summary>
  48. /// <param name="request"></param>
  49. /// <returns></returns>
  50. Task<bool> UpIsTopAsync(GroupChatUserIsTopRequest request);
  51. Task<GroupChatUser> FindGroupChatUserByIdAsync(int id);
  52. /// <summary>
  53. /// 根据群IMID获取用户
  54. /// </summary>
  55. /// <param name="imId"></param>
  56. /// <returns></returns>
  57. Task<IEnumerable<GroupChatUser>> FindGroupChatUserByImId(string imId);
  58. Task<bool> IsDisturbAsync(GroupChatUserIsDisturbRequest request);
  59. Task<IEnumerable<GroupChatUser>> GetAllAsync(SqlKata.Query query);
  60. /// <summary>
  61. /// 添加多个
  62. /// </summary>
  63. /// <param name="groupChatUsers"></param>
  64. /// <returns></returns>
  65. Task<bool> InsertAsync(List<GroupChatUser> groupChatUsers);
  66. Task<IEnumerable<int>> GetUserIdsAsync(int userId);
  67. /// <summary>
  68. /// 获取用户加入的群聊用户人数
  69. /// </summary>
  70. /// <param name="userId"></param>
  71. /// <returns></returns>
  72. Task<int> GetUserIntoGroupChatUserCountAsync(int userId);
  73. Task<GroupChatUser> GetAsync(SqlKata.Query query);
  74. }
  75. }