BaseStudentBursariesApplicantMapper.xml 2.2 KB

12345678910111213141516171819202122232425262728293031
  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.BaseStudentBursariesApplicantMapper">
  6. <select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentBursariesApplicantPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentBursariesApplicantPageVo">
  7. SELECT t2.name AS project_name,t2.start_time,t2.end_time,t4.name AS dictionary_name,
  8. t3.student_id,t3.gender_name,t4.credential_type,t4.credential_number,t3.bank_type,t3.bank_no,t3.grade_name,
  9. t3.class_name,t3.major_name,t3.enroll_type_cn,t3.applicant_amount,t1.status FROM base_student_bursaries_applicant t1
  10. INNER JOIN base_student_bursaries_project t2 ON t1.base_student_bursaries_project_id = t2.id
  11. INNER JOIN base_student_bursaries_student t3 ON t1.id = t3.base_student_bursaries_applicant_id
  12. LEFT JOIN xjr_user t4 ON t3.user_id = t4.id
  13. LEFT JOIN xjr_dictionary_detail t5 ON t2.bursaries_type = t5.code
  14. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
  15. AND t2.id = #{dto.projectId}
  16. ORDER BY t1.sort_code
  17. </select>
  18. <select id="getProjectPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentBursariesApplicantPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentBursariesApplicantPageVo">
  19. SELECT t2.name AS project_name,t2.start_time,t2.end_time,t4.name AS dictionary_name,
  20. t3.student_id,t3.gender_name,t4.credential_type,t4.credential_number,t3.bank_type,t3.bank_no,t3.grade_name,
  21. t3.class_name,t3.major_name,t3.enroll_type_cn,t3.applicant_amount,t1.status FROM base_student_bursaries_applicant t1
  22. INNER JOIN base_student_bursaries_project t2 ON t1.base_student_bursaries_project_id = t2.id
  23. INNER JOIN base_student_bursaries_student t3 ON t1.id = t3.base_student_bursaries_applicant_id
  24. LEFT JOIN xjr_user t4 ON t3.user_id = t4.id
  25. LEFT JOIN xjr_dictionary_detail t5 ON t2.bursaries_type = t5.code
  26. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
  27. AND t2.id = #{dto.projectId}
  28. ORDER BY t1.sort_code
  29. </select>
  30. </mapper>