Browse Source

未登录考试报错

yangfeng 1 year ago
parent
commit
399bfd7cad

+ 8 - 3
web/src/main/java/com/ynfy/buss/exam/exam/mapper/xml/ExamMapper.xml

@@ -78,9 +78,14 @@
 
     <select id="selectExamList"  resultType="com.ynfy.buss.exam.exam.entity.Exam">
         SELECT
-            tmp1.* ,
-            tmp2.try_count,
-            u.passed
+            tmp1.*
+            <choose>
+                <when test="user!=null and user.id!=null and user.id!=''">
+                       ,
+                    tmp2.try_count,
+                    u.passed
+                </when>
+            </choose>
         FROM
         (
             SELECT