Browse Source

直播模块优化

tags/正式3.2.0
雍文秀 2 years ago
parent
commit
f45dc73c11

+ 2
- 2
slive/src/main/java/com/xhkjedu/slive/controller/liveplay/CourseController.java View File

69
         N_Utils.validation(new Object[]{course.getPage(),"显示页码",1
69
         N_Utils.validation(new Object[]{course.getPage(),"显示页码",1
70
                 ,course.getPageSize(),"显示条数",1,course.getSchoolid(),"学校id",1});
70
                 ,course.getPageSize(),"显示条数",1,course.getSchoolid(),"学校id",1});
71
         PageHelper.startPage(course.getPage(), course.getPageSize());
71
         PageHelper.startPage(course.getPage(), course.getPageSize());
72
-        List<LCourse> list = courseService.listAll(course);
72
+        List<CourseVo> list = courseService.listAll(course);
73
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
73
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
74
         return new ResultVo(0,"获取课程列表成功",pageResult);
74
         return new ResultVo(0,"获取课程列表成功",pageResult);
75
     }
75
     }
91
         N_Utils.validation(new Object[]{course.getPage(),"显示页码",1
91
         N_Utils.validation(new Object[]{course.getPage(),"显示页码",1
92
                 ,course.getPageSize(),"显示条数",1,course.getCreateid(),"学生id",1});
92
                 ,course.getPageSize(),"显示条数",1,course.getCreateid(),"学生id",1});
93
         PageHelper.startPage(course.getPage(), course.getPageSize());
93
         PageHelper.startPage(course.getPage(), course.getPageSize());
94
-        List<LCourse> list = courseService.listStu(course);
94
+        List<CourseVo> list = courseService.listStu(course);
95
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
95
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
96
         return new ResultVo(0,"获取学生课程列表成功",pageResult);
96
         return new ResultVo(0,"获取学生课程列表成功",pageResult);
97
     }
97
     }

+ 4
- 4
slive/src/main/java/com/xhkjedu/slive/mapper/gradeclass/ClassStudentMapper.java View File

9
     void deleteById(@Param("classid") Integer classid,@Param("studentid") Integer studentid);
9
     void deleteById(@Param("classid") Integer classid,@Param("studentid") Integer studentid);
10
 
10
 
11
     /**
11
     /**
12
-     * 根据班级id和学生id获取班级学生信息
12
+     * 获取班级学生id
13
      * @Param [classid, studentid]
13
      * @Param [classid, studentid]
14
      * @Author ywx
14
      * @Author ywx
15
-     * @Date 2020/6/19 10:08
16
-     * @return com.xhkjedu.model.gradeclass.TClassStudent
15
+     * @Date 2022/2/24 9:09
16
+     * @return java.lang.Integer
17
      **/
17
      **/
18
-    TClassStudent getByClassIdStudentId(@Param("classid") Integer classid,@Param("studentid") Integer studentid);
18
+    Integer getByClassIdStudentId(@Param("classid") Integer classid,@Param("studentid") Integer studentid);
19
 
19
 
20
     //添加
20
     //添加
21
     void save(@Param("student") TClassStudent student);
21
     void save(@Param("student") TClassStudent student);

+ 2
- 2
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CourseMapper.java View File

18
     void updateStuNum(@Param("courseid") Integer courseid);
18
     void updateStuNum(@Param("courseid") Integer courseid);
19
 
19
 
20
     //课程列表
20
     //课程列表
21
-    List<LCourse> listAll(@Param("course") LCourse course);
21
+    List<CourseVo> listAll(@Param("course") LCourse course);
22
 
22
 
23
     //课程详情
23
     //课程详情
24
     CourseVo findById(@Param("course") LCourse course);
24
     CourseVo findById(@Param("course") LCourse course);
27
     Integer findOnSection(Integer courseid);
27
     Integer findOnSection(Integer courseid);
28
 
28
 
29
     //获取学生课程列表
29
     //获取学生课程列表
30
-    List<LCourse> listStu(@Param("course") LCourse course);
30
+    List<CourseVo> listStu(@Param("course") LCourse course);
31
 
31
 
32
     //修改课程状态
32
     //修改课程状态
33
     void updateState(@Param("course") LCourse course);
33
     void updateState(@Param("course") LCourse course);

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/service/gradeclass/ClassService.java View File

90
 
90
 
91
     //学生选课
91
     //学生选课
92
     public void saveSelection(Integer classid, Integer studentid, Integer teacherid, Integer schoolid) {
92
     public void saveSelection(Integer classid, Integer studentid, Integer teacherid, Integer schoolid) {
93
-        TClassStudent student = classStudentMapper.getByClassIdStudentId(classid, studentid);
93
+        Integer student = classStudentMapper.getByClassIdStudentId(classid, studentid);
94
         if (student == null) {
94
         if (student == null) {
95
             //班级学生
95
             //班级学生
96
             TClassStudent cs = new TClassStudent();
96
             TClassStudent cs = new TClassStudent();

+ 2
- 2
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CourseService.java View File

251
     }
251
     }
252
 
252
 
253
     //获取列表
253
     //获取列表
254
-    public List<LCourse> listAll(LCourse course) {
254
+    public List<CourseVo> listAll(LCourse course) {
255
         return courseMapper.listAll(course);
255
         return courseMapper.listAll(course);
256
     }
256
     }
257
 
257
 
298
     }
298
     }
299
 
299
 
300
     //获取学生课程列表
300
     //获取学生课程列表
301
-    public List<LCourse> listStu(LCourse course) {
301
+    public List<CourseVo> listStu(LCourse course) {
302
         return courseMapper.listStu(course);
302
         return courseMapper.listStu(course);
303
     }
303
     }
304
 
304
 

+ 1
- 1
slive/src/main/resources/application.properties View File

94
 #每隔1小时修改license状态
94
 #每隔1小时修改license状态
95
 cron.updateLicenseState=0 0 0/1 * * ?
95
 cron.updateLicenseState=0 0 0/1 * * ?
96
 #默认为false,不开启定时任务
96
 #默认为false,不开启定时任务
97
-enable.scheduled=true
97
+enable.scheduled=false
98
 
98
 
99
 #版本号
99
 #版本号
100
 versionname=Test_v3.2.0
100
 versionname=Test_v3.2.0

+ 4
- 0
slive/src/main/resources/mapper/gradeclass/ClassStudentMapper.xml View File

8
         left join t_group_student gs on g.groupid = gs.groupid AND gs.studentid=cs.studentid
8
         left join t_group_student gs on g.groupid = gs.groupid AND gs.studentid=cs.studentid
9
         where cs.classid=#{classid} and cs.studentid=#{studentid}
9
         where cs.classid=#{classid} and cs.studentid=#{studentid}
10
     </delete>
10
     </delete>
11
+    <!--获取班级学生id-->
12
+    <select id="getByClassIdStudentId" resultType="java.lang.Integer">
13
+        select csid from t_class_student where classid=#{classid} and studentid=#{studentid} limit 1
14
+    </select>
11
     <!--添加-->
15
     <!--添加-->
12
     <insert id="save">
16
     <insert id="save">
13
         insert ignore into t_class_student (classid,studentid,createid,createtime,schoolid)
17
         insert ignore into t_class_student (classid,studentid,createid,createtime,schoolid)

+ 1
- 1
slive/src/main/resources/mapper/system/UserMapper.xml View File

10
         select userid from t_user where <if test="schoolid!=null">schoolid=#{schoolid} and </if>loginname=#{loginname}
10
         select userid from t_user where <if test="schoolid!=null">schoolid=#{schoolid} and </if>loginname=#{loginname}
11
     </select>
11
     </select>
12
     <!--根据用户id获取姓名-->
12
     <!--根据用户id获取姓名-->
13
-    <select id="getUserNameById" resultType="java.lang.Integer">
13
+    <select id="getUserNameById" resultType="java.lang.String">
14
         select username from t_user where userid=#{userid}
14
         select username from t_user where userid=#{userid}
15
     </select>
15
     </select>
16
     <!--根据登录名获取学生信息-->
16
     <!--根据登录名获取学生信息-->

Loading…
Cancel
Save