WfCadreCandidateMapper.xml 1.3 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.student.mapper.WfCadreCandidateMapper">
  6. <select id="getListPage" parameterType="com.xjrsoft.module.student.dto.WfCadreCandidatePageDto"
  7. resultType="com.xjrsoft.module.student.vo.WfCadreCandidatePageVo">
  8. SELECT
  9. t.*,
  10. t1.name as applicantUserIdCN,
  11. t2.name as cadreDeptIdCN,
  12. t3.name as instructorUserIdCN
  13. FROM wf_cadre_candidate t
  14. LEFT JOIN xjr_user t1 ON (t1.id = t.applicant_user_id)
  15. LEFT JOIN cadre_dept t2 ON (t2.id = t.cadre_dept_id)
  16. LEFT JOIN xjr_user t3 ON (t3.id = t.instructor_user_id)
  17. WHERE t.delete_mark = 0
  18. <if test="dto.cadreDeptId != null and dto.cadreDeptId > 0">
  19. and t.cadre_dept_id = #{dto.cadreDeptId}
  20. </if>
  21. <if test="dto.applicantUserIdCN != null and dto.applicantUserIdCN != ''">
  22. and t1.name like concat('%',#{dto.applicantUserIdCN},'%')
  23. </if>
  24. <if test="dto.studentId != null and dto.studentId != ''">
  25. and t.student_id = #{dto.studentId}
  26. </if>
  27. order by t.id
  28. </select>
  29. </mapper>