Quellcode durchsuchen

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

tags/正式3.7.0
雍文秀 vor 2 Jahren
Ursprung
Commit
070af7df24

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CsMapper.java Datei anzeigen

@@ -20,4 +20,7 @@ public interface CsMapper {
20 20
 
21 21
     //我的课程列表
22 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 Datei anzeigen

@@ -54,6 +54,9 @@ public class LCourse extends BaseBean {
54 54
     //已报学生数量
55 55
     private Integer stunum;
56 56
 
57
+    //学校数量
58
+    private Integer schoolnum = 1;
59
+
57 60
     //班级id
58 61
     private Integer classid;
59 62
 

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CsService.java Datei anzeigen

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

+ 9
- 0
slive/src/main/java/com/xhkjedu/slive/vo/liveplay/CourseSectionVo.java Datei anzeigen

@@ -82,4 +82,13 @@ public class CourseSectionVo {
82 82
 
83 83
     //班级数量
84 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 Datei anzeigen

@@ -115,6 +115,7 @@
115 115
     <!--根据日期获取巡课课节列表-->
116 116
     <select id="listXkByDate" resultType="com.xhkjedu.slive.vo.liveplay.CourseSectionVo">
117 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 119
         ,cs.sectionid,cs.sectionname,cs.sectiondate,cs.teacherid,cs.createid
119 120
         ,cs.planbegintime,cs.planendtime,cs.begintime,cs.endtime,cs.sectionstate,cs.sectionorder
120 121
         ,timestampdiff(second,CONCAT(cs.sectiondate,' ',cs.planbegintime),CONCAT(cs.sectiondate,' ',cs.planendtime)) totaltime

+ 7
- 0
slive/src/main/resources/mapper/liveplay/CsMapper.xml Datei anzeigen

@@ -100,4 +100,11 @@
100 100
         </if>
101 101
         order by cs.sectionstate,abs(timestampdiff(second,concat(cs.sectiondate,' ',cs.planbegintime),#{section.strtime})),cs.sectionid
102 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 110
 </mapper>

Laden…
Abbrechen
Speichern