ITopicRepository.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using GxPress.Common.Page;
  4. using GxPress.Request.App.Topic;
  5. using GxPress.Result.App.Topic;
  6. using Datory;
  7. using GxPress.Result.Job;
  8. namespace GxPress.Repository.Interface
  9. {
  10. public interface ITopicRepository : IRepository
  11. {
  12. /// <summary>
  13. /// 通知查询
  14. /// </summary>
  15. /// <param name="request"></param>
  16. /// <returns></returns>
  17. Task<PagedList<Entity.Topic.Topic>> GetTopicByUserIdAsync(TopicPageSearchRequest request);
  18. /// <summary>
  19. /// 根据GroupId获取通知
  20. /// </summary>
  21. /// <param name="request"></param>
  22. /// <returns></returns>
  23. Task<PagedList<TopicListPageResult>> FindTopicByGroupIdAsync(TopicDetailListRequest request);
  24. Task<int> GetGroupTopicCountAsync(int groupId);
  25. /// <summary>
  26. /// 根据ID获取话题
  27. /// </summary>
  28. /// <param name="id"></param>
  29. /// <returns></returns>
  30. Task<Entity.Topic.Topic> GetAsync(int id);
  31. Task<int> CountAsync(SqlKata.Query query);
  32. Task<IEnumerable<Entity.Topic.Topic>> GetAllAsync(SqlKata.Query query);
  33. Task<int> InsertAsync(Entity.Topic.Topic topic);
  34. Task<bool> DeleteAsync(int id);
  35. Task<bool> UpdateAsync(Entity.Topic.Topic topic);
  36. /// <summary>
  37. /// 执行话题
  38. /// </summary>
  39. /// <returns></returns>
  40. Task<List<JobTopicResult>> ExecuteTopic();
  41. Task<PagedList<TopicListPageResult>> GetTopicPage(TopicPageSearchRequest request, string sql, string countSql);
  42. Task<PagedList<TopicListPageResult>> GetTopicByGroupAsync(TopicPageSearchRequest request);
  43. /// <summary>
  44. ///最新 小组话题分页列表
  45. /// </summary>
  46. /// <param name="request"></param>
  47. /// <returns></returns>
  48. Task<PagedList<TopicListPageResult>> GetGroupTopicPageAsync(SqlKata.Query query, SqlKata.Query countQuery,TopicDetailListRequest request);
  49. /// <summary>
  50. /// 删除草稿箱
  51. /// </summary>
  52. /// <param name="userId"></param>
  53. /// <param name="groupId"></param>
  54. /// <returns></returns>
  55. Task<bool> ClearDraftAsync(int userId, int groupId);
  56. Task<bool> UpdateTopicTextContentAsync();
  57. Task<IEnumerable<int>> GetPublicGroupAsync(int userId);
  58. /// <summary>
  59. /// 我加入的小组
  60. /// </summary>
  61. /// <param name="userId"></param>
  62. /// <returns></returns>
  63. Task<IEnumerable<int>> GetIntoGroupAsync(int userId);
  64. }
  65. }