wangliang 4 роки тому
батько
коміт
d88a0d72f6

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java

@@ -65,6 +65,17 @@ public class TEExamQueryDto implements Serializable {
     @ApiModelProperty(name = "考场名称")
     private String roomName;
 
+    @ApiModelProperty(name = "监考状态,NOT_START:未开始,START:监考中,FINISHED:已结束")
+    private String monitorStatus;
+
+    public String getMonitorStatus() {
+        return monitorStatus;
+    }
+
+    public void setMonitorStatus(String monitorStatus) {
+        this.monitorStatus = monitorStatus;
+    }
+
     public String getRoomCode() {
         return roomCode;
     }

+ 10 - 4
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -43,9 +43,11 @@
         if(t.updateName is not null, t.updateName, t.createName) as updateName,
         if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime,
         t.enableIpLimit,
-        t.monitorVideoSource,
-        group_concat(distinct tees.room_code) as roomCode,
+        t.monitorVideoSource
+        <if test="type != null and type != '' and type == 'monitor'">
+        ,group_concat(distinct tees.room_code) as roomCode,
         group_concat(distinct tees.room_name) as roomName
+        </if>
         from
         (select t.id,
         t.code,
@@ -59,6 +61,7 @@
         t.update_time as updateTime,
         t.enable_ip_limit as enableIpLimit,
         t.monitor_video_source as monitorVideoSource,
+        t.monitor_status as monitorStatus,
         TRUNCATE(t.progress,2) as progress,
         (
         select
@@ -111,7 +114,9 @@
                 and t.enable = #{enable}
             </if>
         </where> ) t
-        left join t_e_exam_student tees on tees.exam_id = t.id
+        <if test="type != null and type != '' and type == 'monitor'">
+            left join t_e_exam_student tees on tees.exam_id = t.id
+        </if>
             group by t.id,
             t.code,
             t.name,
@@ -124,7 +129,8 @@
             t.updateName,
             t.updateTime,
             t.enableIpLimit,
-            t.monitorVideoSource
+            t.monitorVideoSource,
+            t.monitorStatus
          order by t.createTime desc
     </select>