Browse Source

3.3.0 fix

xiaofei 1 năm trước cách đây
mục cha
commit
e0bc358420

+ 2 - 2
teachcloud-mark/src/main/resources/mapper/MarkStudentMapper.xml

@@ -123,10 +123,10 @@
             <if test="startScore != null">
                 <choose>
                     <when test="startScore == 0">
-                        AND (ms.is_absent = 1 OR ms.is_breach = 1 OR ((ms.subjective_score + ms.objective_score) &gt;= #{startScore} AND (ms.subjective_score + ms.objective_score) &lt;= #{endScore}))
+                        AND (ms.is_absent = 1 OR ms.is_breach = 1 OR ((ifnull(ms.subjective_score, 0) + ifnull(ms.objective_score, 0)) &gt;= #{startScore} AND (ifnull(ms.subjective_score,0) + ifnull(ms.objective_score,0)) &lt;= #{endScore}))
                     </when>
                     <otherwise>
-                        AND (ms.is_absent = 0 AND ms.is_breach = 0 AND ((ms.subjective_score + ms.objective_score) &gt;= #{startScore} AND (ms.subjective_score + ms.objective_score) &lt;= #{endScore}))
+                        AND (ms.is_absent = 0 AND ms.is_breach = 0 AND ((ifnull(ms.subjective_score,0) + ifnull(ms.objective_score,0)) &gt;= #{startScore} AND (ifnull(ms.subjective_score,0) + ifnull(ms.objective_score,0)) &lt;= #{endScore}))
                     </otherwise>
                 </choose>
             </if>