IGroupUserRepository.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.App.GroupFolder;
  7. using GxPress.Request.App.GroupUser;
  8. using Datory;
  9. using GxPress.EnumConst;
  10. namespace GxPress.Repository.Interface
  11. {
  12. public interface IGroupUserRepository : IRepository
  13. {
  14. Task<bool> UpdateAsync(GroupUserUpRequest request);
  15. Task<bool> DeleteAsync(SqlKata.Query query);
  16. Task<IEnumerable<GroupUser>> FindGroupUserAsync(GroupUserFindRequest request);
  17. Task<int> InsertAsync(int userId, int groupId, GroupUserRoleTyeConst groupUserRoleId);
  18. Task<GroupUser> GetAsync(SqlKata.Query q);
  19. Task<IEnumerable<GroupUser>> GetAllAsync(SqlKata.Query q);
  20. Task<int> InsertAsync(GroupUser groupUser);
  21. /// <summary>
  22. /// 设置用户是否免打扰
  23. /// </summary>
  24. /// <param name="groupId"></param>
  25. /// <param name="userId"></param>
  26. /// <returns></returns>
  27. Task<bool> SetIsUDisturbAsync(int groupId, int userId);
  28. Task<bool> InsertAsync(List<GroupUser> groupUsers);
  29. /// <summary>
  30. /// 根据用户ID获取所加入的小组用户
  31. /// </summary>
  32. /// <param name="userId"></param>
  33. /// <returns></returns>
  34. Task<IEnumerable<int>> GetGroupUserByUserIdAsync(int userId);
  35. /// <summary>
  36. /// 获取用户加入小组的人数
  37. /// </summary>
  38. /// <param name="userId"></param>
  39. /// <returns></returns>
  40. Task<int> GetUserIntoGroupUserCountAsync(int userId);
  41. }
  42. }