AttendanceRuleDetailsMapper.xml 1.9 KB

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.attendance.mapper.AttendanceRuleDetailsMapper">
  6. <select id="getTodayRules" resultType="com.xjrsoft.module.attendance.entity.AttendanceRuleDetails">
  7. SELECT t2.* FROM attendance_rule_category t1
  8. INNER JOIN attendance_rule_details t2 ON t1.id = t2.attendance_rule_category_id
  9. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0 AND NOW() BETWEEN start_date AND end_date
  10. AND t2.date_type = #{dayOfWeek}
  11. </select>
  12. <select id="getAllTeacherTodyRule" resultType="com.xjrsoft.module.attendance.vo.AttendanceRuleDetailsUserVo">
  13. SELECT t2.*,t5.user_id FROM attendance_rule_category t1
  14. INNER JOIN attendance_rule_details t2 ON t1.id = t2.attendance_rule_category_id
  15. INNER JOIN attendance_user_relation t3 ON t1.id = t3.attendance_rule_category_id
  16. INNER JOIN xjr_user t4 ON t3.user_id = t4.id
  17. INNER JOIN base_teacher t5 ON t4.id = t5.user_id
  18. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0 AND NOW() BETWEEN start_date AND end_date
  19. AND t2.date_type = #{dayOfWeek}
  20. </select>
  21. <select id="getAllStudentTodyRule" resultType="com.xjrsoft.module.attendance.vo.AttendanceRuleDetailsUserVo">
  22. SELECT t2.*,t5.user_id FROM attendance_rule_category t1
  23. INNER JOIN attendance_rule_details t2 ON t1.id = t2.attendance_rule_category_id
  24. INNER JOIN attendance_user_relation t3 ON t1.id = t3.attendance_rule_category_id
  25. INNER JOIN xjr_user t4 ON t3.user_id = t4.id
  26. INNER JOIN base_student t5 ON t4.id = t5.user_id
  27. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0 AND NOW() BETWEEN start_date AND end_date
  28. AND t2.date_type = #{dayOfWeek}
  29. </select>
  30. </mapper>