WfHeadTeacherLeaveMapper.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  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.WfHeadTeacherLeaveMapper">
  6. <select id="getListPage" parameterType="com.xjrsoft.module.teacher.dto.WfHeadTeacherLeavePageDto"
  7. resultType="com.xjrsoft.module.teacher.vo.WfHeadTeacherLeavePageVo">
  8. SELECT
  9. t.id,
  10. t.start_time,
  11. t.end_time,
  12. t.applicant_user_id,
  13. t.substitute_user_id,
  14. t1.name as applicantUserIdCN,
  15. t2.name as substituteUserIdCN,
  16. t3.name as leaveReason
  17. FROM wf_head_teacher_leave t
  18. LEFT JOIN xjr_user t1 ON (t1.id = t.applicant_user_id)
  19. LEFT JOIN xjr_user t2 ON (t2.id = t.substitute_user_id)
  20. LEFT JOIN xjr_dictionary_detail t3 ON (t3.code = t.leave_reason)
  21. WHERE t.delete_mark = 0
  22. <if test="dto.applicantUserIdCN != null and dto.applicantUserIdCN != ''">
  23. and t1.name LIKE CONCAT('%',#{dto.applicantUserIdCN},'%')
  24. </if>
  25. <if test="dto.startTime != null and dto.startTime != ''">
  26. and t.start_time &gt; #{dto.startTime}
  27. </if>
  28. <if test="dto.endTime != null and dto.endTime != ''">
  29. and t.end_time &lt; #{dto.endTime}
  30. </if>
  31. <if test="dto.substituteUserIdCN != null and dto.substituteUserIdCN != ''">
  32. and t1.name LIKE CONCAT('%',#{dto.substituteUserIdCN},'%')
  33. </if>
  34. order by t.id
  35. </select>
  36. </mapper>