소스 검색

课堂回顾列表

tags/正式3.13.0
王宁 1 년 전
부모
커밋
96b8d23289

+ 2
- 1
sclass/src/main/java/com/xhkjedu/sclass/mapper/classroom/ClassroomMapper.java 파일 보기

@@ -10,6 +10,7 @@ import com.xhkjedu.sclass.vo.classroom.ReportRoomVo;
10 10
 import com.xhkjedu.sclass.vo.classroom.RoomCorrectVo;
11 11
 import com.xhkjedu.sclass.vo.classroom.SubjectiveVo;
12 12
 import com.xhkjedu.sclass.vo.paper.CheckClassVo;
13
+import com.xhkjedu.vo.system.UserVo;
13 14
 import org.apache.ibatis.annotations.Param;
14 15
 
15 16
 import java.util.List;
@@ -157,7 +158,7 @@ public interface ClassroomMapper extends TkMapper<TClassroom> {
157 158
      * @Author ywx
158 159
      * @Date 2020/6/15 9:18
159 160
      **/
160
-    List<Map> listClassByDirectorId(@Param("room") TClassroom room);
161
+    List<Map> listClassByDirectorId(@Param("room") TClassroom room,@Param("userVo") UserVo userVo);
161 162
 
162 163
     /**
163 164
      * 功能描述  批量更新班级实际签到学生数量

+ 6
- 1
sclass/src/main/java/com/xhkjedu/sclass/service/classroom/ClassroomService.java 파일 보기

@@ -2,6 +2,7 @@ package com.xhkjedu.sclass.service.classroom;
2 2
 
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.sclass.mapper.classroom.*;
5
+import com.xhkjedu.sclass.mapper.system.UserMapper;
5 6
 import com.xhkjedu.sclass.model.classroom.*;
6 7
 import com.xhkjedu.sclass.utils.ArithUtil;
7 8
 import com.xhkjedu.sclass.vo.classroom.*;
@@ -9,6 +10,7 @@ import com.xhkjedu.sclass.vo.paper.CheckClassVo;
9 10
 import com.xhkjedu.sclass.vo.room.RoomParamVo;
10 11
 import com.xhkjedu.utils.N_Utils;
11 12
 import com.xhkjedu.vo.ResultVo;
13
+import com.xhkjedu.vo.system.UserVo;
12 14
 import lombok.extern.slf4j.Slf4j;
13 15
 import org.springframework.dao.DuplicateKeyException;
14 16
 import org.springframework.stereotype.Service;
@@ -51,6 +53,8 @@ public class ClassroomService {
51 53
     private ClassroomFileMapper classroomFileMapper;
52 54
     @Resource
53 55
     private ClassroomVideoMapper classroomVideoMapper;
56
+    @Resource
57
+    private UserMapper userMapper;
54 58
 
55 59
     /**
56 60
      * 开始课堂
@@ -407,7 +411,8 @@ public class ClassroomService {
407 411
      * @Date 2020/6/15 9:19
408 412
      **/
409 413
     public List<Map> listClassByDirectorId(TClassroom room) {
410
-        List<Map> rooms = classroomMapper.listClassByDirectorId(room);
414
+        UserVo userVo = userMapper.getUserInfoForHandleLog(room.getTeacherid());
415
+        List<Map> rooms = classroomMapper.listClassByDirectorId(room,userVo);
411 416
         classRoomForList(rooms,1);
412 417
         return rooms;
413 418
     }

+ 9
- 2
sclass/src/main/resources/mapper/classroom/ClassroomMapper.xml 파일 보기

@@ -349,9 +349,16 @@
349 349
         FROM t_classroom c LEFT JOIN t_class g ON c.classid=g.classid
350 350
         left join t_user u on c.teacherid=u.userid
351 351
         left join t_director d on c.directorid=d.directorid
352
-        WHERE d.disabled=0 and c.teacherid=#{room.teacherid} and c.lsbid=#{room.lsbid}
352
+        WHERE d.disabled=0 and c.lsbid=#{room.lsbid}
353
+        <if test="userVo.usertype!=null and userVo.usertype==0">
354
+            and c.schoolid=#{userVo.schoolid}
355
+        </if>
356
+        <if test="userVo.usertype!=0">
357
+            and c.teacherid=#{room.teacherid}
358
+        </if>
359
+
353 360
         <if test="room.directorid!=null and room.directorid!='0'.toString() and room.directorid!=''">AND
354
-            c.directorid=#{room.directorid}
361
+            AND c.directorid=#{room.directorid}
355 362
         </if>
356 363
         <if test="room.classid!=null and room.classid!=0">AND c.classid=#{room.classid}</if>
357 364
         <if test="room.createtime!=null and room.createtime!=0">

Loading…
취소
저장