|
@@ -5,8 +5,6 @@
|
|
|
<id column="id_" property="id"/>
|
|
|
<result column="user_id_" property="userId"/>
|
|
|
<result column="lesson_examination_id_" property="lessonExaminationId"/>
|
|
|
- <result column="training_flag_" property="trainingFlag"/>
|
|
|
- <result column="standard_flag_" property="standardFlag"/>
|
|
|
<result column="training_score_" property="trainingScore"/>
|
|
|
<result column="training_time_" property="trainingTime"/>
|
|
|
<result column="training_time_" property="trainingTime"/>
|
|
@@ -35,11 +33,17 @@
|
|
|
<if test="lessonExaminationId != null">
|
|
|
AND sle.lesson_examination_id_ = #{lessonExaminationId}
|
|
|
</if>
|
|
|
- <if test="trainingFlag != null">
|
|
|
- AND sle.training_flag_ = #{trainingFlag}
|
|
|
+ <if test="trainingFlag != null and trainingFlag == true">
|
|
|
+ AND sle.training_time_ IS NOT NULL
|
|
|
</if>
|
|
|
- <if test="standardFlag != null">
|
|
|
- AND sle.standard_flag_ = #{standardFlag}
|
|
|
+ <if test="trainingFlag != null and trainingFlag == false">
|
|
|
+ AND sle.training_time_ IS NULL
|
|
|
+ </if>
|
|
|
+ <if test="standardFlag != null and standardFlag == true">
|
|
|
+ AND sle.training_score_ >= 60
|
|
|
+ </if>
|
|
|
+ <if test="standardFlag != null and standardFlag == false">
|
|
|
+ AND sle.training_score_ < 60
|
|
|
</if>
|
|
|
<if test="userId != null">
|
|
|
AND sle.user_id_ = #{userId}
|
|
@@ -54,11 +58,13 @@
|
|
|
left join student s ON s.user_id_ = sle.user_id_
|
|
|
left join subject sb ON s.subject_id_list_ = sb.id_
|
|
|
left join sys_user su on s.user_id_ = su.id_
|
|
|
+ <include refid="queryPageSql"/>
|
|
|
ORDER BY sle.training_score_ DESC,sle.id_
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
<select id="findCount" resultType="java.lang.Integer">
|
|
|
select COUNT(sle.id_) from student_lesson_examination sle
|
|
|
+ <include refid="queryPageSql"/>
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
<resultMap id="StudentLessonExaminationDtoMap" type="com.ym.mec.biz.dal.dto.StudentLessonExaminationDto1">
|
|
@@ -67,13 +73,13 @@
|
|
|
<result property="phone" column="phone_"/>
|
|
|
<result property="username" column="username_"/>
|
|
|
<result property="trainingScore" column="training_score_"/>
|
|
|
- <association property="detailDtos" javaType="com.ym.mec.biz.dal.dto.StudentLessonExaminationDetailDto1">
|
|
|
+ <collection property="detailDtos" ofType="com.ym.mec.biz.dal.dto.StudentLessonExaminationDetailDto1">
|
|
|
<result property="standardScore" column="standard_score_"/>
|
|
|
<result property="trainingScore" column="training_score_"/>
|
|
|
<result property="actualAvgScore" column="actual_avg_score_"/>
|
|
|
<result property="avgScore" column="avg_score_"/>
|
|
|
<result property="musicScoreName" column="musicScoreName"/>
|
|
|
- </association>
|
|
|
+ </collection>
|
|
|
</resultMap>
|
|
|
<select id="queryStudentPage" resultMap="StudentLessonExaminationDtoMap">
|
|
|
select sle.user_id_,su.username_,su.phone_,sb.name_ subjectName,sle.training_score_,
|
|
@@ -92,7 +98,7 @@
|
|
|
from student_lesson_examination sle
|
|
|
left join lesson_examination le on sle.lesson_examination_id_ = le.id_
|
|
|
where sle.user_id_ = #{userId}
|
|
|
- AND sle.standard_flag_ = 0
|
|
|
+ AND sle.training_score_ < 60
|
|
|
and le.expire_date_ > NOW()
|
|
|
</select>
|
|
|
<select id="getStudentName" resultType="java.util.Map">
|