IGroupUserRepository.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. /// <summary>
  45. /// 查询小组用户是否存在
  46. /// </summary>
  47. /// <param name="userId"></param>
  48. /// <param name="groupId"></param>
  49. /// <returns></returns>
  50. Task<bool> ExistsAsync(int userId, int groupId);
  51. Task<bool> UpdateGroupUserReadDateAsync(int userId, int groupId);
  52. }
  53. }