IGroupUserRepository.cs 1.7 KB

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