wangliang vor 1 Jahr
Ursprung
Commit
fa1f74a8a5
1 geänderte Dateien mit 53 neuen und 18 gelöschten Zeilen
  1. 53 18
      themis-business/src/main/resources/mapper/TEExamStudentLogMapper.xml

+ 53 - 18
themis-business/src/main/resources/mapper/TEExamStudentLogMapper.xml

@@ -3,22 +3,57 @@
 <mapper namespace="com.qmth.themis.business.dao.TEExamStudentLogMapper">
 
 	<select id="getExamStudentLogList" resultType="com.qmth.themis.business.bean.admin.ExamStudentLogDetailListBean">
-		select
-			f.create_time createTime,
-            (case when JSON_VALID(f.title) = 1 then CONVERT((f.title->>'$.title') USING utf8) else f.title end) as type,
-			f.info remark,
-            f.ip,
-            f.country,
-            f.region,
-            f.province,
-            f.city,
-            f.isp,
-            f.id
-		from
-			t_e_exam_student_log f
-		where
-			f.exam_student_id = #{examStudentId}
-		order by
-			f.create_time
-	</select>
+        select * from
+            (select
+                    f.create_time createTime,
+                    (case
+                         when JSON_VALID(f.title) = 1 then convert((f.title->>'$.title') using utf8)
+                         else f.title
+                        end) as type,
+                    f.info remark,
+                    f.ip,
+                    f.country,
+                    f.region,
+                    f.province,
+                    f.city,
+                    f.isp,
+                    f.id
+                from
+                    t_e_exam_student_log f
+                where
+                    f.exam_student_id = #{examStudentId}
+                union all
+                select
+                    f.send_time createTime,
+                    if(f.type = 'TEXT','文本消息','语音消息'),
+                    f.content as remark,
+                    null as ip,
+                    null as country,
+                    null as region,
+                    null as province,
+                    null as city,
+                    null as isp,
+                    f.id
+                from
+                    t_ie_exam_invigilate_notice f
+                where
+                    f.receive_user_id = #{examStudentId}
+                union all
+                select
+                    f.create_time createTime,
+                    '多媒体消息' as type,
+                    f.content as remark,
+                    null as ip,
+                    null as country,
+                    null as region,
+                    null as province,
+                    null as city,
+                    null as isp,
+                    f.id
+                from
+                    t_ie_exam_media_log f
+                where
+                    f.exam_student_id = #{examStudentId}) t
+        order by t.createTime
+    </select>
 </mapper>