WfTeacherleaveMapper.xml 1.4 KB

1234567891011121314151617181920212223242526272829
  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.teacher.mapper.WfTeacherleaveMapper">
  6. <select id="getLeaveCount" resultType="java.lang.Long">
  7. SELECT COUNT(*) FROM wf_teacherleave t1
  8. INNER JOIN xjr_user t2 ON t1.user_id = t2.id
  9. WHERE t1.status = 1 AND t2.delete_mark = 0
  10. AND (
  11. (leave_start_time BETWEEN #{startTime} and #{endTime})
  12. OR (leave_end_time BETWEEN #{startTime} and #{endTime})
  13. OR (leave_start_time > #{startTime} and #{endTime} > leave_end_time)
  14. OR (#{startTime} > leave_start_time and leave_end_time > #{endTime})
  15. )
  16. </select>
  17. <select id="getLeaveList" resultType="com.xjrsoft.module.teacher.entity.WfTeacherleave">
  18. SELECT * FROM wf_teacherleave t1
  19. INNER JOIN xjr_user t2 ON t1.user_id = t2.id
  20. WHERE t1.status = 1 AND t2.delete_mark = 0
  21. AND (
  22. (leave_start_time BETWEEN #{startTime} and #{endTime})
  23. OR (leave_end_time BETWEEN #{startTime} and #{endTime})
  24. OR (leave_start_time > #{startTime} and #{endTime} > leave_end_time)
  25. OR (#{startTime} > leave_start_time and leave_end_time > #{endTime})
  26. )
  27. </select>
  28. </mapper>