SchoolRollFurtherEducationMapper.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.SchoolRollFurtherEducationMapper">
  6. <select id="getPageListPc" parameterType="com.xjrsoft.module.student.dto.SchoolRollFurtherEducationPageDto"
  7. resultType="com.xjrsoft.module.student.vo.SchoolRollFurtherEducationPageVo">
  8. SELECT
  9. t.id,
  10. t.sort_code,
  11. t.student_id AS studentId,
  12. t1.name AS studentIdCN,
  13. t1.credential_number AS credentialNumber,
  14. t2.name AS beforeMajorSetIdCN,
  15. t3.name AS beforeClassIdCN,
  16. t4.name AS backClassIdCN,
  17. t5.name AS backMajorSetIdCN,
  18. t6.name AS applicantUserIdCN,
  19. t.reason,
  20. t.enabled_mark AS enabledMark,
  21. t.status
  22. FROM school_roll_further_education t
  23. LEFT JOIN xjr_user t1 ON (t.student_id = t1.id)
  24. LEFT JOIN base_major_set t2 ON (t.before_major_set_id = t2.id)
  25. LEFT JOIN base_class t3 ON (t.before_class_id = t3.id)
  26. LEFT JOIN base_class t4 ON (t.back_class_id = t4.id)
  27. LEFT JOIN base_major_set t5 ON (t.back_major_set_id = t5.id)
  28. LEFT JOIN xjr_user t6 ON (t.applicant_user_id = t6.id)
  29. WHERE t.delete_mark = 0 AND t.status = 1
  30. <if test="dto.studentIdCN != null and dto.studentIdCN != ''">
  31. and t1.name like concat('%',#{dto.studentIdCN},'%')
  32. </if>
  33. <if test="dto.beforeClassIdCN != null and dto.beforeClassIdCN != ''">
  34. and t3.name like concat('%',#{dto.beforeClassIdCN},'%')
  35. </if>
  36. <if test="dto.backClassIdCN != null and dto.backClassIdCN != ''">
  37. and t4.name like concat('%',#{dto.backClassIdCN},'%')
  38. </if>
  39. <if test="dto.applicantUserIdCN != null and dto.applicantUserIdCN != ''">
  40. and t6.name like concat('%',#{dto.applicantUserIdCN},'%')
  41. </if>
  42. ORDER BY t.id DESC;
  43. </select>
  44. <select id="getDetailById"
  45. resultType="com.xjrsoft.module.student.vo.SchoolRollFurtherEducationVo">
  46. SELECT
  47. t.*,
  48. t1.name AS studentIdCN,
  49. t1.credential_number AS credentialNumber,
  50. t2.name AS beforeMajorSetIdCN,
  51. t3.name AS beforeClassIdCN,
  52. t4.name AS backClassIdCN,
  53. t5.name AS backMajorSetIdCN,
  54. t6.name AS applicantUserIdCN
  55. FROM school_roll_further_education t
  56. LEFT JOIN xjr_user t1 ON (t.student_id = t1.id)
  57. LEFT JOIN base_major_set t2 ON (t.before_major_set_id = t2.id)
  58. LEFT JOIN base_class t3 ON (t.before_class_id = t3.id)
  59. LEFT JOIN base_class t4 ON (t.back_class_id = t4.id)
  60. LEFT JOIN base_major_set t5 ON (t.back_major_set_id = t5.id)
  61. LEFT JOIN xjr_user t6 ON (t.applicant_user_id = t6.id)
  62. WHERE t.id = #{id} AND t.delete_mark = 0 AND t.status = 1;
  63. </select>
  64. </mapper>