ArticleTweetDao.java 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. package com.happy.dao;
  2. import com.happy.Model.*;
  3. import com.happy.vo.*;
  4. import java.util.List;
  5. public interface ArticleTweetDao {
  6. /**
  7. * 根据数据ID查询推文数据
  8. * @param id
  9. * @return
  10. */
  11. ArticleTweet queryArticleById(String id, Integer userId);
  12. /**
  13. * 新增推文数据
  14. * @param articleTweet
  15. * @return
  16. */
  17. int insert(ArticleTweet articleTweet);
  18. /**
  19. * 更新推文审批状态
  20. * @param articleTweet
  21. * @return
  22. */
  23. int updateArticleApprove(ArticleTweet articleTweet);
  24. /**
  25. * 批量存储推文文件
  26. * @param articleFileInfos
  27. * @return
  28. */
  29. int insertArticleFileBatch(List<ArticleFileInfo> articleFileInfos);
  30. /**
  31. * 描述:根据乡镇ID进行民宿分页查询
  32. * @param sqlx
  33. * @param page
  34. * @param rows
  35. * @return
  36. */
  37. List<HotelVo> queryHotelPage(String sqlx, int page, int rows);
  38. /**
  39. * 描述:根据乡镇ID获取民宿总条数
  40. * @param sqlx
  41. * @return
  42. */
  43. int queryHotelTotal(String sqlx);
  44. /**
  45. * 根据民宿ID查询民宿分页数据
  46. * @param sqlx
  47. * @param page
  48. * @param rows
  49. * @return
  50. */
  51. List<HotelVo> queryHotelPageByHotleId(String sqlx, int page, int rows);
  52. /**
  53. * 根据民宿ID查询民宿总数
  54. * @param sqlx
  55. * @return
  56. */
  57. int queryHotelTotalByHotleId(String sqlx);
  58. /**
  59. * 描述:根据乡镇ID查询民宿数据
  60. * @param sqlx
  61. * @return
  62. */
  63. List<HotelVo> queryHotels(String sqlx);
  64. /**
  65. * 获取推文文件数据
  66. * @param sqlx
  67. * @return
  68. */
  69. List<FileInfo> queryList(String sqlx);
  70. /**
  71. * 查询是否关注当前用户
  72. * @param parentId
  73. * @param userId
  74. * @return
  75. */
  76. UserCollect queryUserCollect(Integer parentId, Integer userId);
  77. /**
  78. * 获取十条以内的点赞人列表数据
  79. * @param articleId 文章ID
  80. * @return
  81. */
  82. List<LikeListVo> queryArticleLikes(Integer articleId);
  83. /**
  84. * 获取三条评论数据
  85. * @param articleId
  86. * @return
  87. */
  88. List<ArticleCommentVo> queryArticleComment(Integer articleId);
  89. /**
  90. * 根据文章ID获取评论总数(包括子级)
  91. * @param articleId
  92. * @return
  93. */
  94. int queryArticleCommentTotal(Integer articleId);
  95. /**
  96. * 根据文章ID获取一级评论分页数据
  97. * @param articleId
  98. * @param page
  99. * @param rows
  100. * @return
  101. */
  102. List<ArticleCommentVo> queryCommentPageByArticle(Integer articleId, int page, int rows);
  103. /**
  104. * 根据文章ID获取一级评论总数
  105. * @param articleId
  106. * @return
  107. */
  108. int queryCommentTotalByArticle(Integer articleId);
  109. /**
  110. * 根据文章ID获取子级评论数据
  111. * @param articleId
  112. * @return
  113. */
  114. List<ArticleCommentVo> queryCommentsByArticle(Integer articleId);
  115. /**
  116. * 获取用户主页用户信息
  117. * @param userId
  118. * @return
  119. */
  120. articleUserVo queryUserInfo(Integer userId);
  121. /**
  122. * 获取用户列表中的文章列表数据
  123. * @param userId
  124. * @param sqlWhere
  125. * @param page
  126. * @param rows
  127. * @return
  128. */
  129. List<OwnerArticleVo> queryOwnerArticlePage(Integer userId, String sqlWhere, int page, int rows);
  130. /**
  131. * 获取用户列表中的文章数据总数
  132. * @param userId
  133. * @param sqlWhere
  134. * @return
  135. */
  136. int queryOwnerArticleTotal(Integer userId, String sqlWhere);
  137. /**
  138. * 社区首页推文列表分页数据
  139. * @param townId
  140. * @param userId
  141. * @param type
  142. * @param page
  143. * @param rows
  144. * @return
  145. */
  146. List<ArticleListVo> queryArticlesPage(String keyWord, String townId, Integer userId, Integer type, int page, int rows);
  147. /**
  148. * 社区首页推文列表总数据条数
  149. * @param townId
  150. * @param userId
  151. * @param type
  152. * @return
  153. */
  154. int queryArticlesTotal(String keyWord, String townId, Integer userId, Integer type);
  155. /**
  156. * 相关推文列表分页数据
  157. * @param townId
  158. * @param articleId
  159. * @param page
  160. * @param rows
  161. * @return
  162. */
  163. List<ArticleListVo> relatedTweetPage(Integer userId, String townId, Integer articleId, int page, int rows);
  164. /**
  165. * 相关推文总数据条数
  166. * @param townId
  167. * @param articleId
  168. * @return
  169. */
  170. int relatedTweetTotal(String townId, Integer articleId);
  171. /**
  172. * 查询文章收藏数据
  173. * @param articleId
  174. * @param userId
  175. * @return
  176. */
  177. ArticleCollect queryArticleCollect(Integer articleId, Integer userId);
  178. /**
  179. * 收藏或取消收藏文章
  180. * @param articleCollect
  181. * @return
  182. */
  183. int updateArticleCollect(ArticleCollect articleCollect);
  184. /**
  185. * 评论文章
  186. * @param articleComment
  187. * @return
  188. */
  189. int insertArticleComment(ArticleComment articleComment);
  190. /**
  191. * 查询用户关注记录数据
  192. * @param authorId
  193. * @param userId
  194. * @return
  195. */
  196. UserCollect queryUserCollectNoLose(Integer authorId, Integer userId);
  197. /**
  198. * 关注或取消关注操作
  199. * @param userCollect
  200. * @return
  201. */
  202. int updateUserCollect(UserCollect userCollect);
  203. /**
  204. * 查询用户点赞记录数据
  205. * @param articleId
  206. * @param userId
  207. * @return
  208. */
  209. ArticleLikes queryArticleLike(Integer articleId, Integer userId);
  210. /**
  211. * 点赞文章
  212. * @param articleLikes
  213. * @return
  214. */
  215. int updateArticleLike(ArticleLikes articleLikes);
  216. /**
  217. * 更新用户简介
  218. * @param authorId
  219. * @param descript
  220. * @return
  221. */
  222. int updateDescript(Integer authorId, String descript);
  223. /**
  224. * 点赞分页列表数据
  225. */
  226. List<LikeListVo> queryLikesPage(Integer articleId, int page, int rows);
  227. /**
  228. * 点赞总数据条数
  229. */
  230. int queryLikesTotal(Integer articleId);
  231. /**
  232. * 获取点赞数最多的最新推文数据
  233. */
  234. ArticleLikeMaxVo queryMaxArticleLike();
  235. List<WalkthroughVo> walkthroughPage(String strSql, Integer page, Integer rows);
  236. int walkthroughTotal(String strSql);
  237. public List<ArticleLikeMaxVo> queryTop3ArticleLike();
  238. }