Просмотр исходного кода

直播模块优化

tags/正式3.2.0
雍文秀 2 лет назад
Родитель
Сommit
f45dc73c11

+ 2
- 2
slive/src/main/java/com/xhkjedu/slive/controller/liveplay/CourseController.java Просмотреть файл

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

+ 4
- 4
slive/src/main/java/com/xhkjedu/slive/mapper/gradeclass/ClassStudentMapper.java Просмотреть файл

@@ -9,13 +9,13 @@ public interface ClassStudentMapper extends TkMapper<TClassStudent> {
9 9
     void deleteById(@Param("classid") Integer classid,@Param("studentid") Integer studentid);
10 10
 
11 11
     /**
12
-     * 根据班级id和学生id获取班级学生信息
12
+     * 获取班级学生id
13 13
      * @Param [classid, studentid]
14 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 21
     void save(@Param("student") TClassStudent student);

+ 2
- 2
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CourseMapper.java Просмотреть файл

@@ -18,7 +18,7 @@ public interface CourseMapper extends TkMapper<LCourse> {
18 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 24
     CourseVo findById(@Param("course") LCourse course);
@@ -27,7 +27,7 @@ public interface CourseMapper extends TkMapper<LCourse> {
27 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 33
     void updateState(@Param("course") LCourse course);

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/service/gradeclass/ClassService.java Просмотреть файл

@@ -90,7 +90,7 @@ public class ClassService {
90 90
 
91 91
     //学生选课
92 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 94
         if (student == null) {
95 95
             //班级学生
96 96
             TClassStudent cs = new TClassStudent();

+ 2
- 2
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CourseService.java Просмотреть файл

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

+ 1
- 1
slive/src/main/resources/application.properties Просмотреть файл

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

+ 4
- 0
slive/src/main/resources/mapper/gradeclass/ClassStudentMapper.xml Просмотреть файл

@@ -8,6 +8,10 @@
8 8
         left join t_group_student gs on g.groupid = gs.groupid AND gs.studentid=cs.studentid
9 9
         where cs.classid=#{classid} and cs.studentid=#{studentid}
10 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 16
     <insert id="save">
13 17
         insert ignore into t_class_student (classid,studentid,createid,createtime,schoolid)

+ 1
- 1
slive/src/main/resources/mapper/system/UserMapper.xml Просмотреть файл

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

Загрузка…
Отмена
Сохранить