NewsRelationMapper.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.xjrsoft.module.oa.mapper;
  2. import com.github.yulichang.base.MPJBaseMapper;
  3. import com.xjrsoft.module.oa.entity.NewsRelation;
  4. import org.apache.ibatis.annotations.Insert;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. import java.util.List;
  8. @Mapper
  9. public interface NewsRelationMapper extends MPJBaseMapper<NewsRelation> {
  10. /**
  11. * 添加全体教职工
  12. *
  13. * @param newsId
  14. * @return
  15. */
  16. Boolean insertAllTeaStaff(@Param("newsId") Long newsId);
  17. /**
  18. * 添加所有家长
  19. * @param newsId
  20. * @return
  21. */
  22. Boolean insertAllParentsStaff(@Param("newsId") Long newsId);
  23. /**
  24. * 添加所有学生
  25. * @param newsId
  26. * @return
  27. */
  28. Boolean insertAllStudentStaff(@Param("newsId") Long newsId);
  29. /**
  30. * 添加部门下面的人
  31. *
  32. * @param newsId
  33. * @param deptIdList
  34. * @return
  35. */
  36. Boolean insertDeptUser(@Param("newsId") Long newsId, @Param("deptIdList") List<Long> deptIdList);
  37. /**
  38. * 添加班级下面的人
  39. *
  40. * @param newsId
  41. * @param classIdList
  42. * @return
  43. */
  44. Boolean insertClassUser(@Param("newsId") Long newsId, @Param("classIdList") List<Long> classIdList);
  45. /**
  46. * 添加人员下面的人
  47. *
  48. * @param newsId
  49. * @param userIdList
  50. * @return
  51. */
  52. Boolean insertPersonl(@Param("newsId") Long newsId, @Param("userIdList") List<Long> userIdList);
  53. @Insert("insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark) (select UUID(), #{newsId}, t.id, NOW(), 0 from xjr_user t where t.delete_mark = 0)")
  54. Boolean insertAllUser(@Param("newsId") Long newsId);
  55. }