|
@@ -470,17 +470,17 @@
|
|
|
<sql id="queryStudentListSql">
|
|
|
<where>
|
|
|
<if test="studentId != null">
|
|
|
- er.student_id_ = #{studentId}
|
|
|
+ AND er.student_id_ = #{studentId}
|
|
|
</if>
|
|
|
<if test="examRegistrationId != null">
|
|
|
- er.id_ = #{examRegistrationId}
|
|
|
+ AND er.id_ = #{examRegistrationId}
|
|
|
</if>
|
|
|
<if test="paymentStatus != null and paymentStatus == 1">
|
|
|
<if test="paymentStatus == 1">
|
|
|
- er.status_ = 'AUDIT_PASS'
|
|
|
+ AND er.status_ = 'AUDIT_PASS'
|
|
|
</if>
|
|
|
<if test="paymentStatus == 0">
|
|
|
- er.status_ != 'AUDIT_PASS'
|
|
|
+ AND er.status_ != 'AUDIT_PASS'
|
|
|
</if>
|
|
|
</if>
|
|
|
</where>
|
|
@@ -575,4 +575,20 @@
|
|
|
SELECT DISTINCT tenant_id_ FROM exam_registration
|
|
|
WHERE student_id_ = #{userId} AND tenant_id_ IS NOT NULL
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="countStudentBaseExams" resultType="java.lang.Integer">
|
|
|
+ SELECT COUNT(er.id_) FROM exam_registration er
|
|
|
+ <include refid="queryStudentListSql"/>
|
|
|
+ </select>
|
|
|
+ <resultMap id="StudentBaseExamsDtoMap" type="com.keao.edu.user.dto.StudentBaseExamsDto">
|
|
|
+ <result property="baseExamName" column="examBaseName"/>
|
|
|
+ <result property="tenantId" column="tenant_id_"/>
|
|
|
+ </resultMap>
|
|
|
+ <select id="queryStudentBaseExams" resultMap="StudentBaseExamsDtoMap">
|
|
|
+ SELECT eb.name_ examBaseName,eb.tenant_id_ FROM examination_basic eb
|
|
|
+ LEFT JOIN exam_registration er ON er.examination_basic_id_ = eb.id_
|
|
|
+ <include refid="queryStudentListSql"/>
|
|
|
+ ORDER BY er.update_time_ DESC
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
</mapper>
|