|
@@ -185,21 +185,6 @@
|
|
|
<if test="secretNumber != null and secretNumber != ''">
|
|
|
AND ms.secret_number = #{secretNumber}
|
|
|
</if>
|
|
|
- <if test="orderType != null and orderType != '' and orderField != null and orderField != ''">
|
|
|
- <choose>
|
|
|
- <when test="orderField == 'totalScore'">
|
|
|
- <if test="orderType == 'ASC'">
|
|
|
- order by (ifnull(ms.objective_score, 0) + ifnull(ms.subjective_score, 0)) ASC
|
|
|
- </if>
|
|
|
- <if test="orderType == 'DESC'">
|
|
|
- order by (ifnull(ms.objective_score, 0) + ifnull(ms.subjective_score, 0)) DESC
|
|
|
- </if>
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- order by #{orderField} #{orderType}
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
<if test="dpr != null">
|
|
|
<if test="dpr.requestUserId != null">
|
|
|
AND bes.teacher_id = #{dpr.requestUserId}
|
|
@@ -215,6 +200,21 @@
|
|
|
</if>
|
|
|
</if>
|
|
|
</where>
|
|
|
+ <if test="orderType != null and orderType != '' and orderField != null and orderField != ''">
|
|
|
+ <choose>
|
|
|
+ <when test="orderField == 'totalScore'">
|
|
|
+ <if test="orderType == 'ASC'">
|
|
|
+ order by (ifnull(ms.objective_score, 0) + ifnull(ms.subjective_score, 0)) ASC
|
|
|
+ </if>
|
|
|
+ <if test="orderType == 'DESC'">
|
|
|
+ order by (ifnull(ms.objective_score, 0) + ifnull(ms.subjective_score, 0)) DESC
|
|
|
+ </if>
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ order by #{orderField} #{orderType}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
<if test="orderType == null or orderType == '' or orderField == null or orderField == ''">
|
|
|
order by bes.student_code
|
|
|
</if>
|