ExamArrangementStudentMapper.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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.zhongzheng.modules.exam.mapper.ExamArrangementStudentMapper">
  6. <resultMap type="com.zhongzheng.modules.exam.domain.ExamArrangementStudent" id="ExamArrangementStudentResult">
  7. <result property="arrangementId" column="arrangement_id"/>
  8. <result property="studentId" column="student_id"/>
  9. </resultMap>
  10. <resultMap type="com.zhongzheng.modules.exam.vo.ExamUserVo" id="UserResult">
  11. <result property="userId" column="user_id"/>
  12. <result property="userAccout" column="user_accout"/>
  13. <result property="nickname" column="nickname"/>
  14. <result property="realname" column="realname"/>
  15. <result property="sex" column="sex"/>
  16. <result property="idCard" column="id_card"/>
  17. <result property="telphone" column="telphone"/>
  18. <result property="userLevel" column="user_level"/>
  19. <result property="userBirth" column="user_birth"/>
  20. <result property="eduLevel" column="edu_level"/>
  21. <result property="schoolId" column="school_id"/>
  22. <result property="major" column="major"/>
  23. <result property="entranceTime" column="entrance_time"/>
  24. <result property="openId" column="open_id"/>
  25. <result property="studentCertificateImg" column="student_certificate_img"/>
  26. <result property="idCardImg1" column="id_card_img1"/>
  27. <result property="idCardImg2" column="id_card_img2"/>
  28. <result property="country" column="country"/>
  29. <result property="province" column="province"/>
  30. <result property="city" column="city"/>
  31. <result property="examId" column="id"/>
  32. <result property="integral" column="integral"/>
  33. <result property="examTypeId" column="exam_type_id"/>
  34. <result property="examType" column="exam_type"/>
  35. <result property="signStartTime" column="sign_start_time"/>
  36. <result property="signEndTime" column="sign_end_time"/>
  37. <result property="examAdress" column="exam_adress"/>
  38. <result property="examUrl" column="exam_url"/>
  39. <result property="remarks" column="remarks"/>
  40. <result property="releaseNum" column="release_num"/>
  41. <result property="subscrPe" column="subscr_pe"/>
  42. <result property="signUpPe" column="sign_up_pe"/>
  43. <result property="releaseTime" column="release_time"/>
  44. <result property="updateTime" column="update_time"/>
  45. <result property="createTime" column="create_time"/>
  46. <result property="examTime" column="exam_time"/>
  47. <result property="regGuide" column="reg_guide"/>
  48. <result property="examPeriod" column="exam_period"/>
  49. <result property="status" column="status"/>
  50. <result property="examForm" column="exam_form"/>
  51. <result property="examFromUrl" column="exam_from_url"/>
  52. <result property="printUrl" column="print_url"/>
  53. <result property="gradesUrl" column="grades_url"/>
  54. <result property="scoreLineUrl" column="score_line_url"/>
  55. <result property="certificate" column="certificate"/>
  56. </resultMap>
  57. <resultMap type="com.zhongzheng.modules.exam.vo.ExamArrangementVo" id="ExamArrangementResult">
  58. <result property="id" column="id"/>
  59. <result property="examTypeId" column="uexam_type_id"/>
  60. <result property="examType" column="exam_type"/>
  61. <result property="signStartTime" column="sign_start_time"/>
  62. <result property="signEndTime" column="sign_end_time"/>
  63. <result property="examAdress" column="exam_adress"/>
  64. <result property="examUrl" column="exam_url"/>
  65. <result property="remarks" column="remarks"/>
  66. <result property="releaseNum" column="release_num"/>
  67. <result property="subscrPe" column="subscr_pe"/>
  68. <result property="signUpPe" column="sign_up_pe"/>
  69. <result property="releaseTime" column="release_time"/>
  70. <result property="updateTime" column="update_time"/>
  71. <result property="createTime" column="create_time"/>
  72. <result property="examTime" column="exam_time"/>
  73. <result property="regGuide" column="reg_guide"/>
  74. <result property="examPeriod" column="exam_period"/>
  75. <result property="status" column="status"/>
  76. <result property="examForm" column="exam_form"/>
  77. <result property="examFromUrl" column="exam_from_url"/>
  78. <result property="printUrl" column="print_url"/>
  79. <result property="gradesUrl" column="grades_url"/>
  80. <result property="scoreLineUrl" column="score_line_url"/>
  81. <result property="certificate" column="certificate"/>
  82. </resultMap>
  83. <select id="selectExamUserList" parameterType="com.zhongzheng.modules.exam.bo.ExamArrangementQueryBo" resultMap="UserResult">
  84. SELECT
  85. u.*,
  86. e.*
  87. FROM
  88. exam_arrangement_student s
  89. LEFT JOIN `user` u ON s.student_id = u.user_id
  90. LEFT JOIN exam_arrangement e ON s.arrangement_id = e.id
  91. LEFT JOIN exam_arrangement_time t ON t.arrangement_id = e.id
  92. WHERE 1=1
  93. AND e.status != 0
  94. <if test="startTime != null and startTime != ''">
  95. AND t.start_time BETWEEN #{startTime} and #{endTime}
  96. </if>
  97. <if test="examTypeId != null and examTypeId != ''">
  98. AND e.exam_type_id = #{examTypeId}
  99. </if>
  100. <if test="examPeriod != null and examPeriod != ''">
  101. AND e.exam_period = #{examPeriod}
  102. </if>
  103. <if test="idCard != null and idCard != ''">
  104. AND u.id_card = #{idCard}
  105. </if>
  106. <if test="realname != null and realname != ''">
  107. AND u.realname = #{realname}
  108. </if>
  109. </select>
  110. <select id="selectSubList" parameterType="com.zhongzheng.modules.exam.bo.ExamArrangementQueryBo" resultMap="UserResult">
  111. SELECT
  112. u.*,
  113. e.*
  114. FROM
  115. exam_arrangement_sub s
  116. LEFT JOIN `user` u ON s.sub_id = u.user_id
  117. LEFT JOIN exam_arrangement e ON s.exam_id = e.id
  118. LEFT JOIN exam_arrangement_time t ON t.arrangement_id = e.id
  119. WHERE 1=1
  120. AND e.status != 0
  121. <if test="startTime != null and startTime != ''">
  122. AND t.start_time BETWEEN #{startTime} and #{endTime}
  123. </if>
  124. </select>
  125. </mapper>