Browse Source

巡课专递课堂类型的课显示共几个学校

tags/正式3.7.0
雍文秀 2 years ago
parent
commit
070af7df24

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CsMapper.java View File

20
 
20
 
21
     //我的课程列表
21
     //我的课程列表
22
     List<Map> listMySection(@Param("section") CourseParams params);
22
     List<Map> listMySection(@Param("section") CourseParams params);
23
+
24
+    //获取学校数量
25
+    Integer getSchoolNumByCids(@Param("classids") List<Integer> classids);
23
 }
26
 }

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/model/liveplay/LCourse.java View File

54
     //已报学生数量
54
     //已报学生数量
55
     private Integer stunum;
55
     private Integer stunum;
56
 
56
 
57
+    //学校数量
58
+    private Integer schoolnum = 1;
59
+
57
     //班级id
60
     //班级id
58
     private Integer classid;
61
     private Integer classid;
59
 
62
 

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CsService.java View File

102
             model.setDeleted(1);
102
             model.setDeleted(1);
103
             model.setCourseclass(0);
103
             model.setCourseclass(0);
104
             model.setCourseschool(1);
104
             model.setCourseschool(1);
105
+            //学校数量
106
+            Integer schoolnum = csMapper.getSchoolNumByCids(model.getClassids());
107
+            model.setSchoolnum(schoolnum);
105
             courseMapper.insertUseGeneratedKeys(model);
108
             courseMapper.insertUseGeneratedKeys(model);
106
             if (model.getCoursetype() == 1) {
109
             if (model.getCoursetype() == 1) {
107
                 Integer courseid = model.getId();
110
                 Integer courseid = model.getId();

+ 9
- 0
slive/src/main/java/com/xhkjedu/slive/vo/liveplay/CourseSectionVo.java View File

82
 
82
 
83
     //班级数量
83
     //班级数量
84
     private Integer classnum;
84
     private Integer classnum;
85
+
86
+    //学校数量
87
+    private Integer schoolnum;
88
+
89
+    //直播学校0单个1多个
90
+    private Integer courseschool;
91
+
92
+    //课程类别0专题直播1行政直播
93
+    private Integer courseclass;
85
 }
94
 }

+ 1
- 0
slive/src/main/resources/mapper/liveplay/CourseSectionMapper.xml View File

115
     <!--根据日期获取巡课课节列表-->
115
     <!--根据日期获取巡课课节列表-->
116
     <select id="listXkByDate" resultType="com.xhkjedu.slive.vo.liveplay.CourseSectionVo">
116
     <select id="listXkByDate" resultType="com.xhkjedu.slive.vo.liveplay.CourseSectionVo">
117
         select c.coursename,c.comm,cs.courseid,c.classid,c.coursetype,c.stunum,count(distinct cc.classid)classnum
117
         select c.coursename,c.comm,cs.courseid,c.classid,c.coursetype,c.stunum,count(distinct cc.classid)classnum
118
+        ,c.courseschool,c.schoolnum,c.courseclass
118
         ,cs.sectionid,cs.sectionname,cs.sectiondate,cs.teacherid,cs.createid
119
         ,cs.sectionid,cs.sectionname,cs.sectiondate,cs.teacherid,cs.createid
119
         ,cs.planbegintime,cs.planendtime,cs.begintime,cs.endtime,cs.sectionstate,cs.sectionorder
120
         ,cs.planbegintime,cs.planendtime,cs.begintime,cs.endtime,cs.sectionstate,cs.sectionorder
120
         ,timestampdiff(second,CONCAT(cs.sectiondate,' ',cs.planbegintime),CONCAT(cs.sectiondate,' ',cs.planendtime)) totaltime
121
         ,timestampdiff(second,CONCAT(cs.sectiondate,' ',cs.planbegintime),CONCAT(cs.sectiondate,' ',cs.planendtime)) totaltime

+ 7
- 0
slive/src/main/resources/mapper/liveplay/CsMapper.xml View File

100
         </if>
100
         </if>
101
         order by cs.sectionstate,abs(timestampdiff(second,concat(cs.sectiondate,' ',cs.planbegintime),#{section.strtime})),cs.sectionid
101
         order by cs.sectionstate,abs(timestampdiff(second,concat(cs.sectiondate,' ',cs.planbegintime),#{section.strtime})),cs.sectionid
102
     </select>
102
     </select>
103
+    <!--获取学校数量-->
104
+    <select id="getSchoolNumByCids" resultType="java.lang.Integer">
105
+        select count(distinct c.schoolid) from t_class c where c.classid in
106
+        <foreach collection="classids" item="classid" open="(" close=")" separator=",">
107
+            ${classid}
108
+        </foreach>
109
+    </select>
103
 </mapper>
110
 </mapper>

Loading…
Cancel
Save