CommunityNewsMapper.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package com.ruoyi.system.mapper;
  2. import com.ruoyi.system.domain.communityNews.CommunityNews;
  3. import org.apache.ibatis.annotations.Param;
  4. import java.util.List;
  5. /**
  6. * 社区资讯Mapper接口
  7. *
  8. * @author boman
  9. * @date 2025-02-14
  10. */
  11. public interface CommunityNewsMapper
  12. {
  13. /**
  14. * 查询社区资讯
  15. *
  16. * @param communityId 社区资讯主键
  17. * @return 社区资讯
  18. */
  19. public CommunityNews selectCommunityNewsByCommunityId(Long communityId);
  20. /**
  21. * 查询社区资讯列表
  22. *
  23. * @param communityNews 社区资讯
  24. * @return 社区资讯集合
  25. */
  26. public List<CommunityNews> selectCommunityNewsList(CommunityNews communityNews);
  27. /**
  28. * 新增社区资讯
  29. *
  30. * @param communityNews 社区资讯
  31. * @return 结果
  32. */
  33. public int insertCommunityNews(CommunityNews communityNews);
  34. /**
  35. * 修改社区资讯
  36. *
  37. * @param communityNews 社区资讯
  38. * @return 结果
  39. */
  40. public int updateCommunityNews(CommunityNews communityNews);
  41. /**
  42. * 删除社区资讯
  43. *
  44. * @param communityId 社区资讯主键
  45. * @return 结果
  46. */
  47. public int deleteCommunityNewsByCommunityId(Long communityId);
  48. /**
  49. * 批量删除社区资讯
  50. *
  51. * @param communityIds 需要删除的数据主键集合
  52. * @return 结果
  53. */
  54. public int deleteCommunityNewsByCommunityIds(Long[] communityIds);
  55. /**
  56. * 批量删除社区资讯 等于把资讯关闭status = 2
  57. *
  58. * @param communityIds 需要删除的社区资讯主键
  59. * @return 结果
  60. */
  61. public int updateCommunityNewsStarsByCommunityId(Long[] communityIds);
  62. /**
  63. * 更新收藏数量
  64. * @param communityId
  65. * @param userStars
  66. * @return
  67. */
  68. public int updateCommunityNewsStars(@Param("communityId") Long communityId, @Param("userStars") String userStars);
  69. }