Browse Source

修改直播课程名称和简介

tags/正式3.2.0
王宁 2 years ago
parent
commit
e7a72d6c9f

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

@@ -3,6 +3,7 @@ package com.xhkjedu.slive.controller.liveplay;
3 3
 import com.github.pagehelper.PageHelper;
4 4
 import com.github.pagehelper.PageInfo;
5 5
 import com.xhkjedu.slive.model.liveplay.LCourse;
6
+import com.xhkjedu.slive.model.xz.LXz;
6 7
 import com.xhkjedu.slive.service.liveplay.CourseService;
7 8
 import com.xhkjedu.slive.vo.liveplay.CTypeVo;
8 9
 import com.xhkjedu.slive.vo.liveplay.CourseParams;
@@ -259,4 +260,33 @@ public class CourseController {
259 260
         courseService.handleStu(params);
260 261
         return new ResultVo(0, "处理直播学生成功");
261 262
     }
263
+
264
+
265
+    /**
266
+     * @Description 修改课程名称
267
+     * @Param [c]
268
+     * @Return com.xhkjedu.vo.ResultVo
269
+     * @Author wn
270
+     * @Date 2022/4/1 14:41
271
+     **/
272
+    @PostMapping("/upname")
273
+    public ResultVo updateCoursename(@RequestBody LCourse c){
274
+        N_Utils.validation(new Object[]{c.getCourseid(),"课程id",1,c.getCoursename(),"课程名称",2});
275
+        courseService.updateCoursename(c);
276
+        return new ResultVo(0, "成功修改课程名称");
277
+    }
278
+
279
+    /**
280
+     * @Description 修改课程简介
281
+     * @Param [c]
282
+     * @Return com.xhkjedu.vo.ResultVo
283
+     * @Author wn
284
+     * @Date 2022/4/1 14:41
285
+     **/
286
+    @PostMapping("/upcomm")
287
+    public ResultVo updateCoursecomm(@RequestBody LCourse c){
288
+        N_Utils.validation(new Object[]{c.getCourseid(),"课程id",1});
289
+        courseService.updateCoursecomm(c);
290
+        return new ResultVo(0, "成功修改课程简介");
291
+    }
262 292
 }

+ 5
- 0
slive/src/main/java/com/xhkjedu/slive/controller/liveplay/CourseSectionController.java View File

@@ -83,6 +83,11 @@ public class CourseSectionController {
83 83
         return new ResultVo(0,"获取课程课节列表成功",list);
84 84
     }
85 85
 
86
+    /**
87
+     * @Description 开始直播
88
+     * @Param [section]
89
+     * @Return com.xhkjedu.vo.ResultVo
90
+     **/
86 91
     @PostMapping("/update_state")
87 92
     public ResultVo updateState(@RequestBody LCourseSection section) {
88 93
         N_Utils.validation(new Object[]{section.getSectionid(),"课节id",1});

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

@@ -97,4 +97,9 @@ public interface CourseMapper extends TkMapper<LCourse> {
97 97
 
98 98
     //添加直播学生
99 99
     void addCourseStu(Integer classid, Integer createid, Integer createtime, Integer schoolid, String classids);
100
+
101
+    //修改课程课节名称
102
+    void updateCoursename(@Param("course") LCourse course);
103
+    //修改课程课节备注
104
+    void updateCoursecomm(@Param("course") LCourse course);
100 105
 }

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

@@ -587,4 +587,26 @@ public class CourseService {
587 587
     private List<CourseStudentVo> listNeedHandleCourse(CourseParams params) {
588 588
         return courseMapper.listNeedHandleCourse(params);
589 589
     }
590
+
591
+    /**
592
+     * @Description 修改课程课节名称
593
+     * @Param [c]
594
+     * @Return void
595
+     * @Author wn
596
+     * @Date 2022/4/1 14:39
597
+     **/
598
+    public void updateCoursename(LCourse c){
599
+        courseMapper.updateCoursename(c);
600
+    }
601
+
602
+    /**
603
+     * @Description 修改课程课节备注
604
+     * @Param [c]
605
+     * @Return void
606
+     * @Author wn
607
+     * @Date 2022/4/1 14:40
608
+     **/
609
+    public void updateCoursecomm(LCourse c){
610
+        courseMapper.updateCoursecomm(c);
611
+    }
590 612
 }

+ 11
- 0
slive/src/main/resources/mapper/liveplay/CourseMapper.xml View File

@@ -490,4 +490,15 @@
490 490
         SELECT #{classid},studentid,#{createid}, #{createtime},#{schoolid} FROM t_class_student WHERE classid
491 491
         in(${classids})
492 492
     </insert>
493
+
494
+    <!--修改课程课节名称-->
495
+    <update id="updateCoursename">
496
+        update l_course c ,l_course_section s set c.coursename=#{course.coursename},s.sectionname=#{course.coursename}
497
+        where c.courseid=s.courseid and c.courseid=#{course.courseid}
498
+    </update>
499
+    <!--修改课程课节备注-->
500
+    <update id="updateCoursecomm">
501
+        update l_course c ,l_course_section s set c.comm=#{course.comm},s.comm=#{course.comm}
502
+        where c.courseid=s.courseid and c.courseid=#{course.courseid}
503
+    </update>
493 504
 </mapper>

Loading…
Cancel
Save