Selaa lähdekoodia

直播间相关实体类及接口等

hgw 3 vuotta sitten
vanhempi
commit
e4598a9f98
47 muutettua tiedostoa jossa 3190 lisäystä ja 12 poistoa
  1. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseGroupDao.java
  2. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CoursePlanDao.java
  3. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleDao.java
  4. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  5. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/LiveRoomDao.java
  6. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/LiveRoomVideoDao.java
  7. 243 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/CourseGroupDto.java
  8. 252 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java
  9. 83 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CoursePlan.java
  10. 215 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseSchedule.java
  11. 144 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudentPayment.java
  12. 214 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/LiveRoom.java
  13. 143 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/LiveRoomVideo.java
  14. 136 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotify.java
  15. 59 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotifyConfig.java
  16. 54 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotifyOutput.java
  17. 95 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RoomSpeakerInfo.java
  18. 36 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseGroupEnum.java
  19. 50 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseScheduleTypeEnum.java
  20. 48 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/RoomTypeEnum.java
  21. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseGroupService.java
  22. 17 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CoursePlanService.java
  23. 28 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleService.java
  24. 17 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleStudentPaymentService.java
  25. 25 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/LiveRoomService.java
  26. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/LiveRoomVideoService.java
  27. 44 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java
  28. 30 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CoursePlanServiceImpl.java
  29. 105 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java
  30. 30 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleStudentPaymentServiceImpl.java
  31. 264 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java
  32. 80 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomVideoServiceImpl.java
  33. 190 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/support/WrapperUtil.java
  34. 26 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseCalendarVo.java
  35. 46 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml
  36. 26 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CoursePlanMapper.xml
  37. 42 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  38. 33 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  39. 42 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/LiveRoomMapper.xml
  40. 33 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/LiveRoomVideoMapper.xml
  41. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseGroupController.java
  42. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CoursePlanController.java
  43. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleController.java
  44. 28 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleStudentPaymentController.java
  45. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/LiveRoomController.java
  46. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/LiveRoomVideoController.java
  47. 7 12
      toolset/utils/src/main/java/com/yonge/toolset/utils/validator/ValidationKit.java

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseGroupDao.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 课程组表(CourseGroup)表数据库访问层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:10
+ */
+public interface CourseGroupDao extends BaseMapper<CourseGroup> {
+
+    int insertBatch(@Param("entities") List<CourseGroup> entities);
+
+}
+

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CoursePlanDao.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 课程计划表(CoursePlan)表数据库访问层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+public interface CoursePlanDao extends BaseMapper<CoursePlan> {
+
+    int insertBatch(@Param("entities") List<CoursePlan> entities);
+
+}
+

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleDao.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.CourseSchedule;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 老师课程表(CourseSchedule)表数据库访问层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+public interface CourseScheduleDao extends BaseMapper<CourseSchedule> {
+
+    int insertBatch(@Param("entities") List<CourseSchedule> entities);
+
+}
+

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 课程学生缴费表(CourseScheduleStudentPayment)表数据库访问层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:12
+ */
+public interface CourseScheduleStudentPaymentDao extends BaseMapper<CourseScheduleStudentPayment> {
+
+    int insertBatch(@Param("entities") List<CourseScheduleStudentPayment> entities);
+
+}
+

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/LiveRoomDao.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.LiveRoom;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 直播房间与课程的关系表表(LiveRoom)表数据库访问层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:16
+ */
+public interface LiveRoomDao extends BaseMapper<LiveRoom> {
+
+    int insertBatch(@Param("entities") List<LiveRoom> entities);
+
+}
+

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/LiveRoomVideoDao.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.LiveRoomVideo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 直播视频记录(LiveRoomVideo)表数据库访问层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:17
+ */
+public interface LiveRoomVideoDao extends BaseMapper<LiveRoomVideo> {
+
+    int insertBatch(@Param("entities") List<LiveRoomVideo> entities);
+
+}
+

+ 243 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/CourseGroupDto.java

@@ -0,0 +1,243 @@
+package com.yonge.cooleshow.biz.dal.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Positive;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author hgw
+ * Created by 2022-03-21
+ */
+@ApiModel(value = "课程组接收类")
+public class CourseGroupDto implements Serializable {
+
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @NotBlank(message = "课程类型不能为空")
+    @ApiModelProperty(value = "类型 practice陪练课 live直播课")
+    private String type;
+
+    @NotNull(message = "授课老师不能为空")
+    @ApiModelProperty(value = "授课老师")
+    private Long teacherId;
+
+    @NotNull(message = "课程组名称不能为空")
+    @ApiModelProperty(value = "课程组名称")
+    private String name;
+
+    @NotNull(message = "声部不能为空")
+    @ApiModelProperty(value = "声部")
+    private Long subjectId;
+
+    @NotNull(message = "单节课时长不能为空")
+    @Positive(message = "单节课时长必须大于0")
+    @ApiModelProperty(value = "单节课时长")
+    private Integer singleCourseMinutes;
+
+    @NotNull(message = "课程数不能为空")
+    @Positive(message = "课程数必须大于0")
+    @ApiModelProperty(value = "课程数")
+    private Integer courseNum;
+
+    @NotBlank(message = "课程介绍不能为空")
+    @Size(max = 200, message = "课程介绍长度不能超过200个字")
+    @ApiModelProperty(value = "课程介绍")
+    private String courseIntroduce;
+
+    @NotNull(message = "课程组售价不能为空")
+    @ApiModelProperty(value = "课程组售价")
+    private BigDecimal coursePrice;
+
+    @NotNull(message = "课程组售卖开始日期不能为空")
+    @ApiModelProperty(value = "课程组售卖开始日期")
+    private Date salesStartDate;
+
+    @NotNull(message = "课程组售卖结束日期不能为空")
+    @ApiModelProperty(value = "课程组售卖结束日期")
+    private Date salesEndDate;
+
+    @NotBlank(message = "直播模版不能为空")
+    @ApiModelProperty(value = "直播背景图")
+    private String backgroundPic;
+
+    @NotNull(message = "课程数不能为空")
+    @Positive(message = "课程数必须大于0")
+    @ApiModelProperty(value = "最少成课人数")
+    private Integer mixStudentNum;
+
+    @ApiModelProperty(value = "课时及教学计划")
+    private List<CourseInfoDto> courseInfo;
+
+    @ApiModel(value = "课程详情接收类")
+    static class CourseInfoDto implements Serializable{
+        @NotNull(message = "上课时间不能为空")
+        @ApiModelProperty(value = "上课时间")
+        private Date startTime;
+
+        @NotNull(message = "下课时间不能为空")
+        @ApiModelProperty(value = "下课时间")
+        private Date endTime;
+
+        @NotNull(message = "课堂编号不能为空")
+        @ApiModelProperty(value = "课堂编号-第几堂课")
+        private Integer classNum;
+
+        @NotBlank(message = "教学计划不能为空")
+        @Size(max = 200, message = "教学计划不能超过200个字!")
+        @ApiModelProperty(value = "教学计划/最多200字")
+        private String plan;
+
+        public Date getStartTime() {
+            return startTime;
+        }
+
+        public void setStartTime(Date startTime) {
+            this.startTime = startTime;
+        }
+
+        public Date getEndTime() {
+            return endTime;
+        }
+
+        public void setEndTime(Date endTime) {
+            this.endTime = endTime;
+        }
+
+        public Integer getClassNum() {
+            return classNum;
+        }
+
+        public void setClassNum(Integer classNum) {
+            this.classNum = classNum;
+        }
+
+        public String getPlan() {
+            return plan;
+        }
+
+        public void setPlan(String plan) {
+            this.plan = plan;
+        }
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Integer getSingleCourseMinutes() {
+        return singleCourseMinutes;
+    }
+
+    public void setSingleCourseMinutes(Integer singleCourseMinutes) {
+        this.singleCourseMinutes = singleCourseMinutes;
+    }
+
+    public Integer getCourseNum() {
+        return courseNum;
+    }
+
+    public void setCourseNum(Integer courseNum) {
+        this.courseNum = courseNum;
+    }
+
+    public String getCourseIntroduce() {
+        return courseIntroduce;
+    }
+
+    public void setCourseIntroduce(String courseIntroduce) {
+        this.courseIntroduce = courseIntroduce;
+    }
+
+    public BigDecimal getCoursePrice() {
+        return coursePrice;
+    }
+
+    public void setCoursePrice(BigDecimal coursePrice) {
+        this.coursePrice = coursePrice;
+    }
+
+    public Date getSalesStartDate() {
+        return salesStartDate;
+    }
+
+    public void setSalesStartDate(Date salesStartDate) {
+        this.salesStartDate = salesStartDate;
+    }
+
+    public Date getSalesEndDate() {
+        return salesEndDate;
+    }
+
+    public void setSalesEndDate(Date salesEndDate) {
+        this.salesEndDate = salesEndDate;
+    }
+
+    public String getBackgroundPic() {
+        return backgroundPic;
+    }
+
+    public void setBackgroundPic(String backgroundPic) {
+        this.backgroundPic = backgroundPic;
+    }
+
+    public Integer getMixStudentNum() {
+        return mixStudentNum;
+    }
+
+    public void setMixStudentNum(Integer mixStudentNum) {
+        this.mixStudentNum = mixStudentNum;
+    }
+
+    public List<CourseInfoDto> getCourseInfo() {
+        return courseInfo;
+    }
+
+    public void setCourseInfo(List<CourseInfoDto> courseInfo) {
+        this.courseInfo = courseInfo;
+    }
+}

+ 252 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java

@@ -0,0 +1,252 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 课程组表(CourseGroup)表实体类
+ *
+ * @author hgw
+ * @since 2022-03-23 14:35:19
+ */
+@ApiModel(value = "course_group-课程组表")
+public class CourseGroup implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @TableField("type_")
+    @ApiModelProperty(value = "类型 practice陪练课 live直播课")
+    private String type;
+
+    @TableField("teacher_id_")
+    @ApiModelProperty(value = "授课老师")
+    private Long teacherId;
+
+    @TableField("name_")
+    @ApiModelProperty(value = "课程组名称")
+    private String name;
+
+    @TableField("subject_id_")
+    @ApiModelProperty(value = "声部")
+    private Long subjectId;
+
+    @TableField("single_course_minutes_")
+    @ApiModelProperty(value = "单结课时长")
+    private Integer singleCourseMinutes;
+
+    @TableField("course_num_")
+    @ApiModelProperty(value = "课程数")
+    private Integer courseNum;
+
+    @TableField("course_introduce_")
+    @ApiModelProperty(value = "课程介绍")
+    private String courseIntroduce;
+
+    @TableField("course_price_")
+    @ApiModelProperty(value = "课程组售价")
+    private BigDecimal coursePrice;
+
+    @TableField("status_")
+    @ApiModelProperty(value = "课程组状态 ING进行中 COMPLETE已完成 DISSOLVE-未成课(解散课程) CANCEL已取消-未开始报名前可取消 APPLY报名中 NOT_SALE未开售")
+    private String status;
+
+    @TableField("sales_start_date_")
+    @ApiModelProperty(value = "课程组售卖开始日期")
+    private Date salesStartDate;
+
+    @TableField("sales_end_date_")
+    @ApiModelProperty(value = "课程组售卖结束日期")
+    private Date salesEndDate;
+
+    @TableField("background_pic_")
+    @ApiModelProperty(value = "直播背景图")
+    private String backgroundPic;
+
+    @TableField("mix_student_num_")
+    @ApiModelProperty(value = "最少成课人数")
+    private Integer mixStudentNum;
+
+    @TableField("course_start_time_")
+    @ApiModelProperty(value = "课程开始时间")
+    private Date courseStartTime;
+
+    @TableField("created_by_")
+    @ApiModelProperty(value = "创建人")
+    private Long createdBy;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField("updated_by_")
+    @ApiModelProperty(value = "更新人")
+    private Long updatedBy;
+
+    @TableField("updated_time_")
+    @ApiModelProperty(value = "更新时间")
+    private Date updatedTime;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Integer getSingleCourseMinutes() {
+        return singleCourseMinutes;
+    }
+
+    public void setSingleCourseMinutes(Integer singleCourseMinutes) {
+        this.singleCourseMinutes = singleCourseMinutes;
+    }
+
+    public Integer getCourseNum() {
+        return courseNum;
+    }
+
+    public void setCourseNum(Integer courseNum) {
+        this.courseNum = courseNum;
+    }
+
+    public String getCourseIntroduce() {
+        return courseIntroduce;
+    }
+
+    public void setCourseIntroduce(String courseIntroduce) {
+        this.courseIntroduce = courseIntroduce;
+    }
+
+    public BigDecimal getCoursePrice() {
+        return coursePrice;
+    }
+
+    public void setCoursePrice(BigDecimal coursePrice) {
+        this.coursePrice = coursePrice;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public Date getSalesStartDate() {
+        return salesStartDate;
+    }
+
+    public void setSalesStartDate(Date salesStartDate) {
+        this.salesStartDate = salesStartDate;
+    }
+
+    public Date getSalesEndDate() {
+        return salesEndDate;
+    }
+
+    public void setSalesEndDate(Date salesEndDate) {
+        this.salesEndDate = salesEndDate;
+    }
+
+    public String getBackgroundPic() {
+        return backgroundPic;
+    }
+
+    public void setBackgroundPic(String backgroundPic) {
+        this.backgroundPic = backgroundPic;
+    }
+
+    public Integer getMixStudentNum() {
+        return mixStudentNum;
+    }
+
+    public void setMixStudentNum(Integer mixStudentNum) {
+        this.mixStudentNum = mixStudentNum;
+    }
+
+    public Date getCourseStartTime() {
+        return courseStartTime;
+    }
+
+    public void setCourseStartTime(Date courseStartTime) {
+        this.courseStartTime = courseStartTime;
+    }
+
+    public Long getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(Long createdBy) {
+        this.createdBy = createdBy;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Long getUpdatedBy() {
+        return updatedBy;
+    }
+
+    public void setUpdatedBy(Long updatedBy) {
+        this.updatedBy = updatedBy;
+    }
+
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+
+}
+

+ 83 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CoursePlan.java

@@ -0,0 +1,83 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 课程计划表(CoursePlan)表实体类
+ *
+ * @author hgw
+ * @since 2022-03-23 14:35:20
+ */
+@ApiModel(value = "course_plan-课程计划表")
+public class CoursePlan implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @TableField("course_group_id_")
+    @ApiModelProperty(value = "课程组id")
+    private Integer courseGroupId;
+
+    @TableField("class_num_")
+    @ApiModelProperty(value = "课堂编号-第几堂课")
+    private Integer classNum;
+
+    @TableField("plan_")
+    @ApiModelProperty(value = "教学计划/最多200字")
+    private String plan;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Integer courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Integer getClassNum() {
+        return classNum;
+    }
+
+    public void setClassNum(Integer classNum) {
+        this.classNum = classNum;
+    }
+
+    public String getPlan() {
+        return plan;
+    }
+
+    public void setPlan(String plan) {
+        this.plan = plan;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+}
+

+ 215 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseSchedule.java

@@ -0,0 +1,215 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 老师课程表(CourseSchedule)表实体类
+ *
+ * @author hgw
+ * @since 2022-03-23 14:35:20
+ */
+@ApiModel(value = "course_schedule-老师课程表")
+public class CourseSchedule implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @TableField("course_group_id_")
+    @ApiModelProperty(value = "课程组id_")
+    private Long courseGroupId;
+
+    @TableField("type_")
+    @ApiModelProperty(value = "类型 practice陪练课 live直播课")
+    private String type;
+
+    @TableField("class_num_")
+    @ApiModelProperty(value = "课堂编号-第几堂课")
+    private Integer classNum;
+
+    @TableField("teacher_id_")
+    @ApiModelProperty(value = "上课教师")
+    private Long teacherId;
+
+    @TableField("class_date_")
+    @ApiModelProperty(value = "上课日期")
+    private Date classDate;
+
+    @TableField("start_time_")
+    @ApiModelProperty(value = "上课时间")
+    private Date startTime;
+
+    @TableField("end_time_")
+    @ApiModelProperty(value = "下课时间")
+    private Date endTime;
+
+    @TableField("lock_")
+    @ApiModelProperty(value = "购买陪练课及创建直播课时需要锁定课时 0未锁 1锁定")
+    private Integer lock;
+
+    @TableField("lock_time_")
+    @ApiModelProperty(value = "开始锁定的时间")
+    private Date lockTime;
+
+    @TableField("pre_student_num_")
+    @ApiModelProperty(value = "预计上课人数")
+    private Integer preStudentNum;
+
+    @TableField("ex_student_num_")
+    @ApiModelProperty(value = "实际上课人数")
+    private Integer exStudentNum;
+
+    @TableField("created_by_")
+    @ApiModelProperty(value = "创建人")
+    private Long createdBy;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField("updated_by_")
+    @ApiModelProperty(value = "更新人")
+    private Long updatedBy;
+
+    @TableField("updated_time_")
+    @ApiModelProperty(value = "更新时间")
+    private Date updatedTime;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Integer getClassNum() {
+        return classNum;
+    }
+
+    public void setClassNum(Integer classNum) {
+        this.classNum = classNum;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Date getClassDate() {
+        return classDate;
+    }
+
+    public void setClassDate(Date classDate) {
+        this.classDate = classDate;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getLock() {
+        return lock;
+    }
+
+    public void setLock(Integer lock) {
+        this.lock = lock;
+    }
+
+    public Date getLockTime() {
+        return lockTime;
+    }
+
+    public void setLockTime(Date lockTime) {
+        this.lockTime = lockTime;
+    }
+
+    public Integer getPreStudentNum() {
+        return preStudentNum;
+    }
+
+    public void setPreStudentNum(Integer preStudentNum) {
+        this.preStudentNum = preStudentNum;
+    }
+
+    public Integer getExStudentNum() {
+        return exStudentNum;
+    }
+
+    public void setExStudentNum(Integer exStudentNum) {
+        this.exStudentNum = exStudentNum;
+    }
+
+    public Long getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(Long createdBy) {
+        this.createdBy = createdBy;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Long getUpdatedBy() {
+        return updatedBy;
+    }
+
+    public void setUpdatedBy(Long updatedBy) {
+        this.updatedBy = updatedBy;
+    }
+
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+
+}
+

+ 144 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudentPayment.java

@@ -0,0 +1,144 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 课程学生缴费表(CourseScheduleStudentPayment)表实体类
+ *
+ * @author hgw
+ * @since 2022-03-23 14:35:20
+ */
+@ApiModel(value = "course_schedule_student_payment-课程学生缴费表")
+public class CourseScheduleStudentPayment implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "${column.comment}")
+    private Long id;
+
+    @TableField("user_id_")
+    @ApiModelProperty(value = "学生id;")
+    private Long userId;
+
+    @TableField("course_group_id_")
+    @ApiModelProperty(value = "课程组id")
+    private Long courseGroupId;
+
+    @TableField("course_id_")
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @TableField("order_no_")
+    @ApiModelProperty(value = "订单号")
+    private String orderNo;
+
+    @TableField("original_price_")
+    @ApiModelProperty(value = "原价")
+    private BigDecimal originalPrice;
+
+    @TableField("expect_price_")
+    @ApiModelProperty(value = "预计价格")
+    private BigDecimal expectPrice;
+
+    @TableField("actual_price_")
+    @ApiModelProperty(value = "实际价格")
+    private BigDecimal actualPrice;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField("updated_time_")
+    @ApiModelProperty(value = "更新时间")
+    private Date updatedTime;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public BigDecimal getOriginalPrice() {
+        return originalPrice;
+    }
+
+    public void setOriginalPrice(BigDecimal originalPrice) {
+        this.originalPrice = originalPrice;
+    }
+
+    public BigDecimal getExpectPrice() {
+        return expectPrice;
+    }
+
+    public void setExpectPrice(BigDecimal expectPrice) {
+        this.expectPrice = expectPrice;
+    }
+
+    public BigDecimal getActualPrice() {
+        return actualPrice;
+    }
+
+    public void setActualPrice(BigDecimal actualPrice) {
+        this.actualPrice = actualPrice;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+
+}
+

+ 214 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/LiveRoom.java

@@ -0,0 +1,214 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 直播房间与课程的关系表表(LiveRoom)表实体类
+ *
+ * @author hgw
+ * @since 2022-03-23 14:35:19
+ */
+@ApiModel(value = "live_room-直播房间与课程的关系表表")
+public class LiveRoom implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @TableField("course_group_id_")
+    @ApiModelProperty(value = "课程组id")
+    private Long courseGroupId;
+
+    @TableField("course_id_")
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @TableField("speaker_id_")
+    @ApiModelProperty(value = "主讲人id/老师id")
+    private Long speakerId;
+
+    @TableField("room_uid_")
+    @ApiModelProperty(value = "房间编号")
+    private String roomUid;
+
+    @TableField("room_title_")
+    @ApiModelProperty(value = "房间标题/最多12个字")
+    private String roomTitle;
+
+    @TableField("live_start_time_")
+    @ApiModelProperty(value = "直播开始时间")
+    private Date liveStartTime;
+
+    @TableField("live_end_time_")
+    @ApiModelProperty(value = "直播结束时间")
+    private Date liveEndTime;
+
+    @TableField("live_remark_")
+    @ApiModelProperty(value = "直播内容/最多200个字")
+    private String liveRemark;
+
+    @TableField("live_state_")
+    @ApiModelProperty(value = "直播状态 0未开始 1已开始 2已结束")
+    private Integer liveState;
+
+    @TableField("room_state_")
+    @ApiModelProperty(value = "房间状态 0正常 1已删除 2已销毁")
+    private Integer roomState;
+
+    @TableField("type_")
+    @ApiModelProperty(value = "房间类型 live直播课  temp临时直播间")
+    private String type;
+
+    @TableField("created_by_")
+    @ApiModelProperty(value = "创建人")
+    private Long createdBy;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField("updated_by_")
+    @ApiModelProperty(value = "更新人")
+    private Long updatedBy;
+
+    @TableField("updated_time_")
+    @ApiModelProperty(value = "更新时间")
+    private Date updatedTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public Long getSpeakerId() {
+        return speakerId;
+    }
+
+    public void setSpeakerId(Long speakerId) {
+        this.speakerId = speakerId;
+    }
+
+    public String getRoomUid() {
+        return roomUid;
+    }
+
+    public void setRoomUid(String roomUid) {
+        this.roomUid = roomUid;
+    }
+
+    public String getRoomTitle() {
+        return roomTitle;
+    }
+
+    public void setRoomTitle(String roomTitle) {
+        this.roomTitle = roomTitle;
+    }
+
+    public Date getLiveStartTime() {
+        return liveStartTime;
+    }
+
+    public void setLiveStartTime(Date liveStartTime) {
+        this.liveStartTime = liveStartTime;
+    }
+
+    public Date getLiveEndTime() {
+        return liveEndTime;
+    }
+
+    public void setLiveEndTime(Date liveEndTime) {
+        this.liveEndTime = liveEndTime;
+    }
+
+    public String getLiveRemark() {
+        return liveRemark;
+    }
+
+    public void setLiveRemark(String liveRemark) {
+        this.liveRemark = liveRemark;
+    }
+
+    public Integer getLiveState() {
+        return liveState;
+    }
+
+    public void setLiveState(Integer liveState) {
+        this.liveState = liveState;
+    }
+
+    public Integer getRoomState() {
+        return roomState;
+    }
+
+    public void setRoomState(Integer roomState) {
+        this.roomState = roomState;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Long getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(Long createdBy) {
+        this.createdBy = createdBy;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Long getUpdatedBy() {
+        return updatedBy;
+    }
+
+    public void setUpdatedBy(Long updatedBy) {
+        this.updatedBy = updatedBy;
+    }
+
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+
+}
+

+ 143 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/LiveRoomVideo.java

@@ -0,0 +1,143 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 直播视频记录(LiveRoomVideo)表实体类
+ *
+ * @author hgw
+ * @since 2022-03-23 14:35:20
+ */
+@ApiModel(value = "live_room_video-直播视频记录")
+public class LiveRoomVideo implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @TableField("course_group_id_")
+    @ApiModelProperty(value = "课程组id")
+    private Long courseGroupId;
+
+    @TableField("course_id_")
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @TableField("room_uid_")
+    @ApiModelProperty(value = "房间编号")
+    private String roomUid;
+
+    @TableField("record_id_")
+    @ApiModelProperty(value = "融云直播视频id")
+    private String recordId;
+
+    @TableField("url_")
+    @ApiModelProperty(value = "直播视频地址")
+    private String url;
+
+    @TableField("start_time_")
+    @ApiModelProperty(value = "视频开始时间")
+    private Date startTime;
+
+    @TableField("end_time_")
+    @ApiModelProperty(value = "视频结束时间")
+    private Date endTime;
+
+    @TableField("type")
+    @ApiModelProperty(value = "1: 录制开始;2: 录制切片;3: 录制结束;4: 文件上传-融云回调完成;0开始录制  1录制结束 2融云回调完成")
+    private Integer type;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public String getRoomUid() {
+        return roomUid;
+    }
+
+    public void setRoomUid(String roomUid) {
+        this.roomUid = roomUid;
+    }
+
+    public String getRecordId() {
+        return recordId;
+    }
+
+    public void setRecordId(String recordId) {
+        this.recordId = recordId;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+}
+

+ 136 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotify.java

@@ -0,0 +1,136 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+public class RecordNotify {
+	//时间戳,单位为毫秒
+	Long timestamp;
+	//回调事件类型,如下:1: 录制开始;2: 录制切片;3: 录制结束;4: 文件上传
+	Integer type;
+	//当前使用的 App Key。
+	String appKey;
+	//录制 ID,每次录制任务的唯一标识。如果文件切片,可以通过此 ID 进行关联
+	String recordId;
+	//房间 ID 。
+	String roomId;
+	//会话 ID,每次通话的唯一标识
+	String sessionId;
+	//用户 ID。如果录制模式为 Mix,此字段为空。
+	String userId;
+	//录制模式0:音视频 single 模式; 1:纯视频 single 模式; 2:纯音频 single 模式;
+	//3:音视频 mix 模式;
+	//4:纯视频 mix 模式;
+	//5:纯音频 mix 模式;
+	//6:单人 mix 音视频模式
+	Integer mode;
+	RecordNotifyOutput output;
+	RecordNotifyConfig config;
+	//扩展字段,内容为手动录制时传入的 extra 字段的值
+	String extra;
+	//状态码,200 为正常
+	Integer code;
+	//错误信息。
+	String errorMessage;
+
+    public Long getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(Long timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getAppKey() {
+        return appKey;
+    }
+
+    public void setAppKey(String appKey) {
+        this.appKey = appKey;
+    }
+
+    public String getRecordId() {
+        return recordId;
+    }
+
+    public void setRecordId(String recordId) {
+        this.recordId = recordId;
+    }
+
+    public String getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(String roomId) {
+        this.roomId = roomId;
+    }
+
+    public String getSessionId() {
+        return sessionId;
+    }
+
+    public void setSessionId(String sessionId) {
+        this.sessionId = sessionId;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public Integer getMode() {
+        return mode;
+    }
+
+    public void setMode(Integer mode) {
+        this.mode = mode;
+    }
+
+    public RecordNotifyOutput getOutput() {
+        return output;
+    }
+
+    public void setOutput(RecordNotifyOutput output) {
+        this.output = output;
+    }
+
+    public RecordNotifyConfig getConfig() {
+        return config;
+    }
+
+    public void setConfig(RecordNotifyConfig config) {
+        this.config = config;
+    }
+
+    public String getExtra() {
+        return extra;
+    }
+
+    public void setExtra(String extra) {
+        this.extra = extra;
+    }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    public void setErrorMessage(String errorMessage) {
+        this.errorMessage = errorMessage;
+    }
+}

+ 59 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotifyConfig.java

@@ -0,0 +1,59 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+
+public class RecordNotifyConfig {
+    //录制启动模式: 1 自动启动录制任务
+    Integer trigger;
+
+    //Mix模式下布局:2 悬浮布局(默认) 3 自适应布局
+    Integer mixLayout;
+
+    //文件切片时间(分钟)
+    Integer slicesMin;
+
+    //设置的音频文件格式
+    String audioFormat;
+
+    //设置的视频文件格式
+    String videoFormat;
+
+    public Integer getTrigger() {
+        return trigger;
+    }
+
+    public void setTrigger(Integer trigger) {
+        this.trigger = trigger;
+    }
+
+    public Integer getMixLayout() {
+        return mixLayout;
+    }
+
+    public void setMixLayout(Integer mixLayout) {
+        this.mixLayout = mixLayout;
+    }
+
+    public Integer getSlicesMin() {
+        return slicesMin;
+    }
+
+    public void setSlicesMin(Integer slicesMin) {
+        this.slicesMin = slicesMin;
+    }
+
+    public String getAudioFormat() {
+        return audioFormat;
+    }
+
+    public void setAudioFormat(String audioFormat) {
+        this.audioFormat = audioFormat;
+    }
+
+    public String getVideoFormat() {
+        return videoFormat;
+    }
+
+    public void setVideoFormat(String videoFormat) {
+        this.videoFormat = videoFormat;
+    }
+}

+ 54 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotifyOutput.java

@@ -0,0 +1,54 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+public class RecordNotifyOutput {
+    //缓存的文件名
+    String fileName;
+    //音频采样率,如 48000。如果当前录制任务没有录制音频,该字段为空
+    Long audioSample;
+    //视频分辨率,如 640x480
+    String videoResoulation;
+    //切片生成的录制文件大小
+    Integer fileSize;
+    //已上传到的第三方存储的 URL
+    String fileUrl;
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public Long getAudioSample() {
+        return audioSample;
+    }
+
+    public void setAudioSample(Long audioSample) {
+        this.audioSample = audioSample;
+    }
+
+    public String getVideoResoulation() {
+        return videoResoulation;
+    }
+
+    public void setVideoResoulation(String videoResoulation) {
+        this.videoResoulation = videoResoulation;
+    }
+
+    public Integer getFileSize() {
+        return fileSize;
+    }
+
+    public void setFileSize(Integer fileSize) {
+        this.fileSize = fileSize;
+    }
+
+    public String getFileUrl() {
+        return fileUrl;
+    }
+
+    public void setFileUrl(String fileUrl) {
+        this.fileUrl = fileUrl;
+    }
+}

+ 95 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RoomSpeakerInfo.java

@@ -0,0 +1,95 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author hgw
+ * Created by 2022-03-22
+ */
+public class RoomSpeakerInfo implements Serializable {
+    //主讲人id
+    private Long speakerId;
+    //主讲人名称
+    private String speakerName;
+    //直播状态 0在房间 1不在房间
+    private Integer state;
+    //房间uid
+    private String roomUid;
+    //房间创建时间
+    private Date createRoomTime;
+    //进入房间时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date joinRoomTime;
+    //退出房间时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date exitRoomTime;
+
+    private String roomType;
+
+    public Long getSpeakerId() {
+        return speakerId;
+    }
+
+    public void setSpeakerId(Long speakerId) {
+        this.speakerId = speakerId;
+    }
+
+    public String getSpeakerName() {
+        return speakerName;
+    }
+
+    public void setSpeakerName(String speakerName) {
+        this.speakerName = speakerName;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public String getRoomUid() {
+        return roomUid;
+    }
+
+    public void setRoomUid(String roomUid) {
+        this.roomUid = roomUid;
+    }
+
+    public Date getCreateRoomTime() {
+        return createRoomTime;
+    }
+
+    public void setCreateRoomTime(Date createRoomTime) {
+        this.createRoomTime = createRoomTime;
+    }
+
+    public Date getJoinRoomTime() {
+        return joinRoomTime;
+    }
+
+    public void setJoinRoomTime(Date joinRoomTime) {
+        this.joinRoomTime = joinRoomTime;
+    }
+
+    public Date getExitRoomTime() {
+        return exitRoomTime;
+    }
+
+    public void setExitRoomTime(Date exitRoomTime) {
+        this.exitRoomTime = exitRoomTime;
+    }
+
+    public String getRoomType() {
+        return roomType;
+    }
+
+    public void setRoomType(String roomType) {
+        this.roomType = roomType;
+    }
+}

+ 36 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseGroupEnum.java

@@ -0,0 +1,36 @@
+package com.yonge.cooleshow.biz.dal.enums;
+
+public enum CourseGroupEnum{
+    ING("ING", "进行中"),
+    COMPLETE("COMPLETE", "已完成"),
+    DISSOLVE("DISSOLVE", "未成课"),//解散课程
+    CANCEL("CANCEL", "已取消"),
+    APPLY("APPLY", "报名中"),
+    NOT_SALE("NOT_SALE", "未开售");
+
+    private String code;
+
+    private String msg;
+
+    CourseGroupEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+}

+ 50 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseScheduleTypeEnum.java

@@ -0,0 +1,50 @@
+package com.yonge.cooleshow.biz.dal.enums;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 课程类型
+ */
+public enum CourseScheduleTypeEnum {
+
+    PRACTICE("PRACTICE", "陪练课"),
+    LIVE("LIVE", "直播课");
+
+    private String code;
+
+    private String msg;
+
+    CourseScheduleTypeEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    /**
+     * 校验code是否存在
+     * @param code code
+     * @return true存在
+     */
+    public static boolean isExistCode(String code) {
+        CourseScheduleTypeEnum[] values = CourseScheduleTypeEnum.values();
+        List<String> collect = Arrays.stream(values).map(CourseScheduleTypeEnum::getCode).collect(Collectors.toList());
+        return collect.contains(code);
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+}

+ 48 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/RoomTypeEnum.java

@@ -0,0 +1,48 @@
+package com.yonge.cooleshow.biz.dal.enums;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public enum RoomTypeEnum {
+
+    LIVE("LIVE", "直播课"),
+    TEMP("TEMP", "临时直播间");
+
+    private String code;
+
+    private String msg;
+
+    RoomTypeEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    /**
+     * 校验code是否存在
+     * @param code code
+     * @return true存在
+     */
+    public static boolean isExistCode(String code) {
+        CourseScheduleTypeEnum[] values = CourseScheduleTypeEnum.values();
+        List<String> collect = Arrays.stream(values).map(CourseScheduleTypeEnum::getCode).collect(Collectors.toList());
+        return collect.contains(code);
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+}

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseGroupService.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.CourseGroupDao;
+import com.yonge.cooleshow.biz.dal.dto.CourseGroupDto;
+import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
+
+/**
+ * 课程组表(CourseGroup)表服务接口
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:10
+ */
+public interface CourseGroupService extends IService<CourseGroup> {
+
+    CourseGroupDao getDao();
+
+    void add(CourseGroupDto dto);
+}
+

+ 17 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CoursePlanService.java

@@ -0,0 +1,17 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.CoursePlanDao;
+import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
+
+/**
+ * 课程计划表(CoursePlan)表服务接口
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+public interface CoursePlanService extends IService<CoursePlan> {
+
+    CoursePlanDao getDao();
+}
+

+ 28 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleService.java

@@ -0,0 +1,28 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.CourseScheduleDao;
+import com.yonge.cooleshow.biz.dal.entity.CourseSchedule;
+
+import javax.validation.Valid;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 老师课程表(CourseSchedule)表服务接口
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+public interface CourseScheduleService extends IService<CourseSchedule> {
+
+    CourseScheduleDao getDao();
+
+    void lockCourseTime(Long id);
+
+    void unlockCourseTime(Long id);
+
+    void add(@Valid CourseSchedule course);
+
+}
+

+ 17 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleStudentPaymentService.java

@@ -0,0 +1,17 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
+
+/**
+ * 课程学生缴费表(CourseScheduleStudentPayment)表服务接口
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:12
+ */
+public interface CourseScheduleStudentPaymentService extends IService<CourseScheduleStudentPayment> {
+
+    CourseScheduleStudentPaymentDao getDao();
+}
+

+ 25 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/LiveRoomService.java

@@ -0,0 +1,25 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.LiveRoomDao;
+import com.yonge.cooleshow.biz.dal.entity.IMApiResultInfo;
+import com.yonge.cooleshow.biz.dal.entity.ImRoomMessage;
+import com.yonge.cooleshow.biz.dal.entity.LiveRoom;
+import com.yonge.cooleshow.biz.dal.entity.RecordNotify;
+
+/**
+ * 直播房间与课程的关系表表(LiveRoom)表服务接口
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:17
+ */
+public interface LiveRoomService extends IService<LiveRoom> {
+
+    LiveRoomDao getDao();
+
+    void createTempLiveRoom(LiveRoom room);
+
+
+
+}
+

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/LiveRoomVideoService.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.LiveRoomVideoDao;
+import com.yonge.cooleshow.biz.dal.entity.LiveRoomVideo;
+import com.yonge.cooleshow.biz.dal.entity.RecordNotify;
+
+/**
+ * 直播视频记录(LiveRoomVideo)表服务接口
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:17
+ */
+public interface LiveRoomVideoService extends IService<LiveRoomVideo> {
+
+    LiveRoomVideoDao getDao();
+
+    void recordSync(RecordNotify recordNotify);
+}
+

+ 44 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java

@@ -0,0 +1,44 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.biz.dal.dao.CourseGroupDao;
+import com.yonge.cooleshow.biz.dal.dto.CourseGroupDto;
+import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
+import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 课程组表(CourseGroup)表服务实现类
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:10
+ */
+@Service("courseGroupService")
+public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGroup> implements CourseGroupService {
+
+    private final static Logger log = LoggerFactory.getLogger(CourseGroupServiceImpl.class);
+
+    @Override
+    public CourseGroupDao getDao() {
+        return this.baseMapper;
+    }
+
+    /**
+     * 新增课程组
+     * @param dto
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void add(CourseGroupDto dto){
+
+    }
+
+
+
+}
+

+ 30 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CoursePlanServiceImpl.java

@@ -0,0 +1,30 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.biz.dal.dao.CoursePlanDao;
+import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
+import com.yonge.cooleshow.biz.dal.service.CoursePlanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 课程计划表(CoursePlan)表服务实现类
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+@Service("coursePlanService")
+public class CoursePlanServiceImpl extends ServiceImpl<CoursePlanDao, CoursePlan> implements CoursePlanService {
+
+    private final static Logger log = LoggerFactory.getLogger(CoursePlanServiceImpl.class);
+
+    @Override
+    public CoursePlanDao getDao() {
+        return this.baseMapper;
+    }
+
+}
+

+ 105 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -0,0 +1,105 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.biz.dal.dao.CourseScheduleDao;
+import com.yonge.cooleshow.biz.dal.entity.CourseSchedule;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleTypeEnum;
+import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
+import org.apache.commons.collections.CollectionUtils;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
+
+import javax.validation.Valid;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 老师课程表(CourseSchedule)表服务实现类
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+@Validated
+@Service("courseScheduleService")
+public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, CourseSchedule> implements CourseScheduleService {
+
+    private final static Logger log = LoggerFactory.getLogger(CourseScheduleServiceImpl.class);
+
+    @Override
+    public CourseScheduleDao getDao() {
+        return this.baseMapper;
+    }
+
+    /**
+     * 查询这个时间段有没有被占用-校验课时
+     *
+     * @param teacherId 老师id
+     * @param startTime 开始时间
+     * @param endTime   结束时间
+     * @return true 没有被占用  false 被占用
+     */
+    public boolean checkCourseTime(Long teacherId, Date startTime, Date endTime) {
+        List<CourseSchedule> list = this.list(new QueryWrapper<>(new CourseSchedule()).lambda()
+                .eq(CourseSchedule::getTeacherId, teacherId)
+                .gt(CourseSchedule::getEndTime, startTime)
+                .lt(CourseSchedule::getStartTime, endTime)
+        );
+        return CollectionUtils.isEmpty(list);
+    }
+
+    /**
+     * 锁定课时
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void lockCourseTime(Long id) {
+        CourseSchedule course = new CourseSchedule();
+        course.setId(id);
+        course.setLock(1);
+        course.setLockTime(new Date());
+        this.updateById(course);
+    }
+
+    /**
+     * 解锁
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void unlockCourseTime(Long id) {
+        CourseSchedule course = new CourseSchedule();
+        course.setId(id);
+        course.setLock(0);
+        course.setLockTime(new Date());
+        this.updateById(course);
+    }
+
+    /**
+     * 添加课时
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void add(@Valid CourseSchedule course) {
+        boolean typeFlag = CourseScheduleTypeEnum.isExistCode(course.getType());
+        if (!typeFlag) {
+            throw new RuntimeException("课程类型不正确");
+        }
+        this.save(course);
+    }
+
+    /**
+     * 课程日历
+     * @param teacherId 老师id
+     * @param date 年月日 yyyy-MM-dd 都是1号
+     */
+    public void courseCalendar(Long teacherId,String date) {
+
+    }
+
+}
+

+ 30 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleStudentPaymentServiceImpl.java

@@ -0,0 +1,30 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
+import com.yonge.cooleshow.biz.dal.service.CourseScheduleStudentPaymentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 课程学生缴费表(CourseScheduleStudentPayment)表服务实现类
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:12
+ */
+@Service("courseScheduleStudentPaymentService")
+public class CourseScheduleStudentPaymentServiceImpl extends ServiceImpl<CourseScheduleStudentPaymentDao, CourseScheduleStudentPayment> implements CourseScheduleStudentPaymentService {
+
+    private final static Logger log = LoggerFactory.getLogger(CourseScheduleStudentPaymentServiceImpl.class);
+
+    @Override
+    public CourseScheduleStudentPaymentDao getDao() {
+        return this.baseMapper;
+    }
+
+}
+

+ 264 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java

@@ -0,0 +1,264 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.cooleshow.biz.dal.dao.LiveRoomDao;
+import com.yonge.cooleshow.biz.dal.entity.*;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleTypeEnum;
+import com.yonge.cooleshow.biz.dal.enums.RoomTypeEnum;
+import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
+import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
+import com.yonge.cooleshow.biz.dal.service.LiveRoomService;
+import com.yonge.cooleshow.biz.dal.support.IMHelper;
+import com.yonge.cooleshow.common.exception.BizException;
+import com.yonge.toolset.utils.date.DateUtil;
+import org.apache.commons.collections.CollectionUtils;
+import org.redisson.api.RedissonClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.function.Function;
+
+/**
+ * 直播房间与课程的关系表表(LiveRoom)表服务实现类
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:17
+ */
+@Service("liveRoomService")
+public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> implements LiveRoomService {
+    private final static Logger log = LoggerFactory.getLogger(LiveRoomServiceImpl.class);
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+    @Autowired
+    private IMHelper imHelper;
+    @Autowired
+    private RedissonClient redissonClient;
+    @Autowired
+    private CourseGroupService courseGroupService;
+    @Autowired
+    private CourseScheduleService courseScheduleService;
+
+    //替换的字符串
+    public static final String USER_ID = "${userId}";
+    public static final String ROOM_UID = "${roomUid}";
+    public static final String COOLESHOW = "COOLESHOW";
+
+    //直播间累计用户信息-指只要进入到该房间的用户都要记录
+    public static final String LIVE_ROOM_TOTAL_USER_LIST = COOLESHOW + ":LIVE_ROOM_TOTAL_USER_LIST:" + ROOM_UID;
+    //主讲人信息
+    public static final String LIVE_SPEAKER_INFO = COOLESHOW + ":LIVE_SPEAKER_INFO:" + USER_ID;
+    //用户对应的直播间Uid
+    public static final String LIVE_USER_ROOM = COOLESHOW + ":LIVE_ROOM_USER:" + USER_ID;
+    //房间点赞数
+    public static final String LIVE_ROOM_LIKE = COOLESHOW + ":LIVE_ROOM_LIKE:" + ROOM_UID;
+    //生成房间UID
+    public static Function<Long, String> GenRoomUid = (userId) -> COOLESHOW + "-" + userId + "-" + new Date().getTime();
+
+    @Override
+    public LiveRoomDao getDao() {
+        return this.baseMapper;
+    }
+
+    /**
+     * 定时任务创建直播间
+     */
+    public void createLiveRoom() {
+        Date now = new Date();
+        Date endTime = DateUtil.addMinutes(now, 30);
+        //查询课时表生成直播间 这里错了
+        List<CourseSchedule> courseScheduleList = courseScheduleService.list(new QueryWrapper<CourseSchedule>().lambda()
+                .eq(CourseSchedule::getType, CourseScheduleTypeEnum.LIVE.getCode())
+                .eq(CourseSchedule::getLock, 0)
+                .ge(CourseSchedule::getStartTime, now)
+                .le(CourseSchedule::getStartTime, endTime));
+        if (CollectionUtils.isEmpty(courseScheduleList)) {
+            return;
+        }
+        courseScheduleList.forEach(c -> {
+            LiveRoom room = new LiveRoom();
+            room.setCourseGroupId(c.getCourseGroupId());
+            room.setCourseId(c.getId());
+            room.setRoomUid(GenRoomUid.apply(c.getTeacherId()));
+            room.setSpeakerId(c.getTeacherId());
+            room.setLiveStartTime(c.getStartTime());
+            room.setLiveEndTime(c.getEndTime());
+            room.setLiveState(0);
+            room.setRoomState(0);
+            room.setType(RoomTypeEnum.LIVE.getCode());
+            room.setCreatedBy(-2L);
+            room.setCreatedTime(now);
+            this.save(room);
+            //生成主讲人信息
+            createSpeakerInfo(room);
+            //
+            //去融云创建房间
+            createLiveRoom(room.getRoomUid(), room.getRoomTitle());
+        });
+
+    }
+
+    /**
+     * 创建临时房间-直播间
+     */
+    public void createTempLiveRoom(LiveRoom room) {
+        log.info("createLiveRoom>>>>>>roomUid:{}", room.getRoomUid());
+        try {
+
+            //临时课程没有课程组和课表
+            if (room.getType().equals(RoomTypeEnum.TEMP.getCode())) {
+                room.setCourseGroupId(0L);
+                room.setCourseId(0L);
+            }
+            //查询主讲人信息
+            SysUser sysUser = getSysUser();
+            if (Objects.isNull(sysUser)) {
+                return;
+            }
+            room.setRoomUid(GenRoomUid.apply(sysUser.getId()));
+            this.save(room);
+            //生成主讲人信息到缓存
+            createSpeakerInfo(room, sysUser);
+            //去融云创建房间
+            createLiveRoom(room.getRoomUid(), room.getRoomTitle());
+        } catch (Exception e) {
+            log.error(">>>>>>>>>> createLiveRoom error roomUid:{} msg:{}", room.getRoomUid(), e.getMessage());
+        }
+    }
+
+    //生成主讲人信息
+    private void createSpeakerInfo(LiveRoom room) {
+        //查询主讲人信息
+        SysUser sysUser = getSysUser(room.getSpeakerId());
+        if (Objects.isNull(sysUser)) {
+            return;
+        }
+        createSpeakerInfo(room, sysUser);
+    }
+
+    private void createSpeakerInfo(LiveRoom room, SysUser sysUser) {
+        RoomSpeakerInfo speakerInfo = new RoomSpeakerInfo();
+        speakerInfo.setSpeakerId(sysUser.getId());
+        speakerInfo.setSpeakerName(sysUser.getRealName());
+        speakerInfo.setCreateRoomTime(new Date());
+        speakerInfo.setRoomUid(room.getRoomUid());
+        speakerInfo.setRoomType(room.getType());
+        //写入主讲人信息
+        redissonClient.getBucket(LIVE_SPEAKER_INFO.replace(USER_ID, room.getSpeakerId().toString())).set(speakerInfo);
+        //生成0点赞
+        redissonClient.getBucket(LIVE_ROOM_LIKE.replace(ROOM_UID, room.getRoomUid())).set(0);
+    }
+
+    /**
+     * 创建房间-聊天室
+     *
+     * @param roomId   房间Uid
+     * @param roomName 房间名称
+     */
+    private IMApiResultInfo createLiveRoom(String roomId, String roomName) {
+        IMApiResultInfo resultInfo;
+        try {
+            resultInfo = imHelper.createChatRoom(roomId, roomName);
+        } catch (Exception e) {
+            log.error("create chatRoom error >>>", e.getCause());
+            throw new RuntimeException("创建聊天室失败!");
+        }
+        if (!resultInfo.isSuccess()) {
+            log.error("create chatRoom error: {}", resultInfo.getErrorMessage());
+            throw new RuntimeException("创建聊天室失败!");
+        }
+        log.info("create chatRoom success: {}", roomId);
+        return resultInfo;
+    }
+
+    /**
+     * 销毁房间-聊天室
+     *
+     * @param roomId 房间Uid
+     */
+    private IMApiResultInfo destroyLiveRoom(String roomId) {
+        //删除服务器房间
+        List<String> deleteRoomIds = new ArrayList<String>() {{
+            add(roomId);
+        }};
+        IMApiResultInfo resultInfo;
+        try {
+            resultInfo = imHelper.deleteChrm(deleteRoomIds);
+        } catch (Exception e) {
+            throw new RuntimeException("关闭聊天室失败!");
+        }
+        if (!resultInfo.isSuccess()) {
+            log.error("destroy chatRoom error: {}", resultInfo.getErrorMessage());
+            throw new RuntimeException("关闭聊天室失败!");
+        }
+        return resultInfo;
+    }
+
+    /**
+     * 发送消息
+     *
+     * @param message
+     */
+    private IMApiResultInfo publishRoomMessage(ImRoomMessage message) {
+        log.info("publishRoomMessage message : {}", JSONObject.toJSONString(message));
+        IMApiResultInfo resultInfo;
+        try {
+            resultInfo = imHelper.publishRoomMessage(message.getFromUserId(), message.getToChatroomId(), message);
+        } catch (Exception e) {
+            throw new RuntimeException("消息发送失败" + e.getMessage());
+        }
+        if (!resultInfo.isSuccess()) {
+            log.error("publishRoomMessage chatRoom error: {}", resultInfo.getErrorMessage());
+            throw new RuntimeException("消息发送失败!");
+        }
+        return resultInfo;
+    }
+
+    /**
+     * 查询用户是否在聊天室-不是实时的
+     *
+     * @param chatroomId 要查询的聊天室 ID(必传)
+     * @param userId     要查询的用户 ID(必传)
+     * @return true 在聊天室,false 不在聊天室
+     * <p>有可能出现已退出聊天室后使用该功能查询,得到的结果是未退出聊天室
+     * <p>触发融云退出聊天室机制:
+     * <p>1.聊天室中用户在离线 30 秒后有新消息产生时或离线后聊天室中产生 30 条消息时会被自动退出聊天室
+     * <p>2.此状态需要聊天室中有新消息时才会进行同步
+     */
+    private boolean userExistInRoom(String chatroomId, String userId) {
+        log.info("userExistInRoom chatroomId : {}  userId : {}", chatroomId, userId);
+        IMApiResultInfo resultInfo;
+        try {
+            resultInfo = imHelper.isInChartRoom(chatroomId, userId);
+        } catch (Exception e) {
+            throw new RuntimeException("查询失败" + e.getMessage());
+        }
+        if (!resultInfo.isSuccess()) {
+            log.error("userExistInRoom  chatroomId : {}  userId : {}", chatroomId, userId);
+            throw new RuntimeException("查询失败!");
+        }
+        return resultInfo.isSuccess() && resultInfo.getInChrm();
+    }
+
+
+    private SysUser getSysUser(Long userId) {
+        return Optional.ofNullable(userId)
+                .map(sysUserFeignService::queryUserById)
+                .orElseThrow(() -> new BizException("用户不存在"));
+    }
+
+    private SysUser getSysUser() {
+        //修改机构基础信息
+        return Optional.ofNullable(sysUserFeignService.queryUserInfo())
+                .orElseThrow(() -> new BizException("用户不存在"));
+    }
+
+}
+

+ 80 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomVideoServiceImpl.java

@@ -0,0 +1,80 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.biz.dal.dao.LiveRoomVideoDao;
+import com.yonge.cooleshow.biz.dal.entity.LiveRoom;
+import com.yonge.cooleshow.biz.dal.entity.LiveRoomVideo;
+import com.yonge.cooleshow.biz.dal.entity.RecordNotify;
+import com.yonge.cooleshow.biz.dal.service.LiveRoomService;
+import com.yonge.cooleshow.biz.dal.service.LiveRoomVideoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * 直播视频记录(LiveRoomVideo)表服务实现类
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:17
+ */
+@Service("liveRoomVideoService")
+public class LiveRoomVideoServiceImpl extends ServiceImpl<LiveRoomVideoDao, LiveRoomVideo> implements LiveRoomVideoService {
+
+    private final static Logger log = LoggerFactory.getLogger(LiveRoomVideoServiceImpl.class);
+
+    @Autowired
+    private LiveRoomService liveRoomService;
+
+    @Override
+    public LiveRoomVideoDao getDao() {
+        return this.baseMapper;
+    }
+
+    @Override
+    public void recordSync(RecordNotify recordNotify) {
+        if (recordNotify.getCode().equals(200)) {
+            //云端录制文件地址
+            String fileUrl = recordNotify.getOutput().getFileUrl();
+            //房间uid
+            String roomUid = recordNotify.getRoomId();
+            //融云唯一id标识
+            String recordId = recordNotify.getRecordId();
+            //回调事件类型
+            Integer notifyType = recordNotify.getType();
+            if (Objects.nonNull(notifyType)) {
+                Date now = new Date();
+                LiveRoomVideo video = this.getOne(new QueryWrapper<LiveRoomVideo>().lambda()
+                        .eq(LiveRoomVideo::getRoomUid, roomUid)
+                        .eq(LiveRoomVideo::getRecordId, recordId));
+                //notifyType 1: 录制开始;4: 文件上传-融云回调完成
+                if (notifyType == 1) {
+                    video = new LiveRoomVideo();
+                    LiveRoom room = liveRoomService.getOne(new QueryWrapper<LiveRoom>().lambda()
+                            .eq(LiveRoom::getRoomUid, roomUid));
+                    video.setCourseGroupId(room.getCourseGroupId());
+                    video.setCourseId(room.getId());
+                    video.setRoomUid(roomUid);
+                    video.setRecordId(recordId);
+                    video.setUrl(fileUrl);
+                    video.setStartTime(now);
+                    video.setType(notifyType);
+                    video.setCreatedTime(now);
+                    this.save(video);
+                }
+                if (notifyType == 4) {
+                    video.setEndTime(now);
+                    video.setType(notifyType);
+                    this.updateById(video);
+                }
+
+            }
+        }
+    }
+
+}
+

+ 190 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/support/WrapperUtil.java

@@ -0,0 +1,190 @@
+package com.yonge.cooleshow.biz.dal.support;
+
+import com.alibaba.fastjson.JSONObject;
+import com.yonge.cooleshow.common.exception.BizException;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+/**
+ * @author hgw
+ * Created by 2021-12-20
+ */
+public class WrapperUtil {
+
+    public static final Predicate<? super Object> ObjPredicate = (Predicate<Object>) Objects::nonNull;
+
+    public static final Predicate<? super String> StrPredicate = (Predicate<String>) StringUtils::isNotBlank;
+
+    public static final Predicate<? super Collection<?>> ListPredicate = (Predicate<Collection<?>>) CollectionUtils::isNotEmpty;
+
+    public static <S, O> Integer toInt(Map<S, O> map, S str, String exMsg) {
+        Optional<O> o = Optional.ofNullable(map)
+                .map(m -> m.get(str));
+        return intOptional(o)
+                .orElseThrow(() -> new BizException(exMsg));
+    }
+
+    public static <S, O> Integer toInt(Map<S, O> map, S str) {
+        Optional<O> o = Optional.ofNullable(map)
+                .map(m -> m.get(str));
+        return intOptional(o)
+                .orElse(null);
+    }
+
+    public static Integer toInt(String str) {
+        return Optional.ofNullable(str)
+                .map(Integer::valueOf)
+                .orElse(null);
+    }
+
+    public static <O> Optional<Integer> intOptional(Optional<O> optional) {
+        return optional
+                .map(String::valueOf)
+                .map(Integer::valueOf);
+    }
+
+    public static <S, O> String toStr(Map<S, O> map, S str) {
+        Optional<O> o = Optional.ofNullable(map)
+                .map(m -> m.get(str));
+        return strOptional(o)
+                .orElse(null);
+    }
+
+    public static <S, O> String toStr(Map<S, O> map, S str, String exMsg) {
+        Optional<O> o = Optional.ofNullable(map)
+                .map(m -> m.get(str));
+        return strOptional(o)
+                .orElseThrow(() -> new BizException(exMsg));
+    }
+
+    private static <O> Optional<String> strOptional(Optional<O> optional) {
+        return optional
+                .filter(s -> s instanceof String)
+                .map(String::valueOf)
+                .filter(StrPredicate);
+    }
+
+    public static List<String> toList(String key) {
+        return toList(key, ",");
+    }
+
+    public static List<String> toList(String key, String symbol) {
+        return toListOptional(key, symbol)
+                .orElse(null);
+    }
+
+    /**
+     * 将用逗号分割的字符串转换为List
+     *
+     * @param key 用逗号分割的字符
+     * @return Optional
+     */
+    public static Optional<List<String>> toListOptional(String key) {
+        return toListOptional(key, ",");
+    }
+
+    public static Optional<List<String>> toListOptional(String key, String symbol) {
+        return Optional.ofNullable(key)
+                .filter(StrPredicate)
+                .map(b -> b.split(symbol))
+                .map(WrapperUtil::collectToList)
+                .filter(ListPredicate);
+    }
+
+    public static List<String> collectToList(String[] b) {
+        return Arrays.stream(b)
+                .filter(StrPredicate)
+                .distinct()
+                .collect(Collectors.toList());
+    }
+
+    /**
+     * 全部有值则为true
+     *
+     * @param obj 多个对象
+     */
+    public static boolean checkObj(Object... obj) {
+        return Arrays.stream(obj).noneMatch(Objects::isNull);
+    }
+
+    /**
+     * 检查str中是否包含 o
+     * 包含返回true
+     */
+    public static boolean checkStr(String o, String... str) {
+        if (StrPredicate.test(o) && ObjPredicate.test(str)) {
+            return Arrays.asList(str).contains(o);
+        } else {
+            return false;
+        }
+    }
+
+    public static boolean checkInObj(Object o, Object... str) {
+        if (ObjPredicate.test(str)) {
+            return Arrays.asList(str).contains(o);
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * 根据分组groupVal进行聚合分组
+     *
+     * @param list     待聚合的集合
+     * @param groupVal 分组value
+     */
+    public static <S, L> Map<S, List<L>> groupList(List<L> list, Function<? super L, ? extends S> groupVal) {
+        return list.stream()
+                .filter(ObjPredicate)
+                .collect(Collectors.groupingBy(groupVal));
+    }
+
+    /**
+     * 根据groupVal进行聚合累加
+     *
+     * @param list   待聚合的集合
+     * @param sumVal 需要聚合操作的字段
+     */
+    public static <L> BigDecimal sumList(List<L> list, Function<? super L, BigDecimal> sumVal) {
+        return list.stream()
+                .map(sumVal)
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+    }
+
+    /**
+     * 对比a,b集和
+     * <p> 示例
+     * <p>  传入a -> [1,3,4,6]
+     * <p>  传入b -> [1,2,4]
+     * <p> 执行该方法后a,b会被修改为
+     * <p> a -> [3,6]
+     * <p> b -> [2]
+     */
+    @SuppressWarnings("unchecked")
+    public static <O> void listDifference(List<O> a, List<O> b) {
+        //将ab并集
+        Collection<O> abUn = CollectionUtils.retainAll(a, b);
+        //删除a中abUn的值
+        a.removeAll(abUn);
+        //删除b中abUn的值
+        b.removeAll(abUn);
+    }
+
+    @SuppressWarnings("unchecked")
+    public static Map<String, Object> toMap(Object obj) {
+        if (obj instanceof Map) {
+            return (Map<String, Object>) obj;
+        }
+        return Optional.ofNullable(obj)
+                .map(JSONObject::toJSON)
+                .map(o -> JSONObject.toJavaObject((JSONObject) o, Map.class))
+                .orElse(new HashMap<String, Object>());
+    }
+
+}

+ 26 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseCalendarVo.java

@@ -0,0 +1,26 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+/**
+ * @author hgw
+ * Created by 2022-03-21
+ */
+@ApiModel(value = "TeacherApplyDetail对象", description = "老师入驻申请信息")
+public class CourseCalendarVo {
+
+    @ApiModelProperty("课程日期 ")
+    private Date courseDate;
+
+    @ApiModelProperty("是否节假日 0是 1否 ")
+    private Integer holidays;
+
+    @ApiModelProperty("排课是否满了 0是 1否  ")
+    private Integer fullDate;
+
+
+
+}

+ 46 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.CourseGroupDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
+        <id column="id_" jdbcType="BIGINT" property="id"/>
+        <result column="type_" jdbcType="VARCHAR" property="type"/>
+        <result column="teacher_id_" jdbcType="INTEGER" property="teacherId"/>
+        <result column="name_" jdbcType="VARCHAR" property="name"/>
+        <result column="subject_id_" jdbcType="INTEGER" property="subjectId"/>
+        <result column="single_course_minutes_" jdbcType="INTEGER" property="singleCourseMinutes"/>
+        <result column="course_num_" jdbcType="INTEGER" property="courseNum"/>
+        <result column="course_introduce_" jdbcType="VARCHAR" property="courseIntroduce"/>
+        <result column="course_price_" jdbcType="VARCHAR" property="coursePrice"/>
+        <result column="status_" jdbcType="VARCHAR" property="status"/>
+        <result column="sales_start_date_" jdbcType="TIMESTAMP" property="salesStartDate"/>
+        <result column="sales_end_date_" jdbcType="TIMESTAMP" property="salesEndDate"/>
+        <result column="background_pic_" jdbcType="VARCHAR" property="backgroundPic"/>
+        <result column="mix_student_num_" jdbcType="INTEGER" property="mixStudentNum"/>
+        <result column="course_start_time_" jdbcType="TIMESTAMP" property="courseStartTime"/>
+        <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
+        <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
+        <result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
+        <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id_
+        , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_, mix_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_
+    </sql>
+
+    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
+            parameterType="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
+        insert into course_group(type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
+        course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_,
+        mix_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.type}, #{entity.teacherId}, #{entity.name}, #{entity.subjectId}, #{entity.singleCourseMinutes},
+            #{entity.courseNum}, #{entity.courseIntroduce}, #{entity.coursePrice}, #{entity.status},
+            #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},
+            #{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
+            #{entity.updatedTime})
+        </foreach>
+    </insert>
+
+</mapper>

+ 26 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CoursePlanMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.CoursePlanDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.CoursePlan">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="course_group_id_" jdbcType="INTEGER" property="courseGroupId"/>
+        <result column="class_num_" jdbcType="INTEGER" property="classNum"/>
+        <result column="plan_" jdbcType="VARCHAR" property="plan"/>
+        <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id_
+        , course_group_id_, class_num_, plan_, created_time_
+    </sql>
+
+    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
+            parameterType="com.yonge.cooleshow.biz.dal.entity.CoursePlan">
+        insert into course_plan(course_group_id_, class_num_, plan_, created_time_)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.courseGroupId}, #{entity.classNum}, #{entity.plan}, #{entity.createdTime})
+        </foreach>
+    </insert>
+
+</mapper>

+ 42 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.CourseScheduleDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.CourseSchedule">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="course_group_id_" jdbcType="INTEGER" property="courseGroupId"/>
+        <result column="type_" jdbcType="VARCHAR" property="type"/>
+        <result column="class_num_" jdbcType="INTEGER" property="classNum"/>
+        <result column="teacher_id_" jdbcType="INTEGER" property="teacherId"/>
+        <result column="class_date_" jdbcType="TIMESTAMP" property="classDate"/>
+        <result column="start_time_" jdbcType="TIMESTAMP" property="startTime"/>
+        <result column="end_time_" jdbcType="TIMESTAMP" property="endTime"/>
+        <result column="lock_" jdbcType="INTEGER" property="lock"/>
+        <result column="lock_time_" jdbcType="TIMESTAMP" property="lockTime"/>
+        <result column="pre_student_num_" jdbcType="INTEGER" property="preStudentNum"/>
+        <result column="ex_student_num_" jdbcType="INTEGER" property="exStudentNum"/>
+        <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
+        <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
+        <result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
+        <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id_
+        , course_group_id_, type_, class_num_, teacher_id_, class_date_, start_time_, end_time_, lock_, lock_time_, pre_student_num_, ex_student_num_, created_by_, created_time_, updated_by_, updated_time_
+    </sql>
+
+    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
+            parameterType="com.yonge.cooleshow.biz.dal.entity.CourseSchedule">
+        insert into course_schedule(course_group_id_, type_, class_num_, teacher_id_, class_date_, start_time_,
+        end_time_, lock_, lock_time_, pre_student_num_, ex_student_num_, created_by_, created_time_, updated_by_,
+        updated_time_)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.courseGroupId}, #{entity.type}, #{entity.classNum}, #{entity.teacherId}, #{entity.classDate},
+            #{entity.startTime}, #{entity.endTime}, #{entity.lock}, #{entity.lockTime}, #{entity.preStudentNum},
+            #{entity.exStudentNum}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
+            #{entity.updatedTime})
+        </foreach>
+    </insert>
+
+</mapper>

+ 33 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentPaymentDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="user_id_" jdbcType="INTEGER" property="userId"/>
+        <result column="course_group_id_" jdbcType="INTEGER" property="courseGroupId"/>
+        <result column="course_id_" jdbcType="INTEGER" property="courseId"/>
+        <result column="order_no_" jdbcType="VARCHAR" property="orderNo"/>
+        <result column="original_price_" jdbcType="VARCHAR" property="originalPrice"/>
+        <result column="expect_price_" jdbcType="VARCHAR" property="expectPrice"/>
+        <result column="actual_price_" jdbcType="VARCHAR" property="actualPrice"/>
+        <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
+        <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id_
+        , user_id_, course_group_id_, course_id_, order_no_, original_price_, expect_price_, actual_price_, created_time_, updated_time_
+    </sql>
+
+    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
+            parameterType="com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment">
+        insert into course_schedule_student_payment(user_id_, course_group_id_, course_id_, order_no_, original_price_,
+        expect_price_, actual_price_, created_time_, updated_time_)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.userId}, #{entity.courseGroupId}, #{entity.courseId}, #{entity.orderNo}, #{entity.originalPrice},
+            #{entity.expectPrice}, #{entity.actualPrice}, #{entity.createdTime}, #{entity.updatedTime})
+        </foreach>
+    </insert>
+
+</mapper>

+ 42 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/LiveRoomMapper.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.LiveRoomDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.LiveRoom">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="course_group_id_" jdbcType="INTEGER" property="courseGroupId"/>
+        <result column="course_id_" jdbcType="INTEGER" property="courseId"/>
+        <result column="speaker_id_" jdbcType="INTEGER" property="speakerId"/>
+        <result column="room_uid_" jdbcType="VARCHAR" property="roomUid"/>
+        <result column="room_title_" jdbcType="VARCHAR" property="roomTitle"/>
+        <result column="live_start_time_" jdbcType="TIMESTAMP" property="liveStartTime"/>
+        <result column="live_end_time_" jdbcType="TIMESTAMP" property="liveEndTime"/>
+        <result column="live_remark_" jdbcType="VARCHAR" property="liveRemark"/>
+        <result column="live_state_" jdbcType="INTEGER" property="liveState"/>
+        <result column="room_state_" jdbcType="INTEGER" property="roomState"/>
+        <result column="type_" jdbcType="VARCHAR" property="type"/>
+        <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
+        <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
+        <result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
+        <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id_
+        , course_group_id_, course_id_, speaker_id_, room_uid_, room_title_, live_start_time_, live_end_time_, live_remark_, live_state_, room_state_, type_, created_by_, created_time_, updated_by_, updated_time_
+    </sql>
+
+    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
+            parameterType="com.yonge.cooleshow.biz.dal.entity.LiveRoom">
+        insert into live_room(course_group_id_, course_id_, speaker_id_, room_uid_, room_title_, live_start_time_,
+        live_end_time_, live_remark_, live_state_, room_state_, type_, created_by_, created_time_, updated_by_,
+        updated_time_)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.courseGroupId}, #{entity.courseId}, #{entity.speakerId}, #{entity.roomUid}, #{entity.roomTitle},
+            #{entity.liveStartTime}, #{entity.liveEndTime}, #{entity.liveRemark}, #{entity.liveState},
+            #{entity.roomState}, #{entity.type}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
+            #{entity.updatedTime})
+        </foreach>
+    </insert>
+
+</mapper>

+ 33 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/LiveRoomVideoMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.LiveRoomVideoDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.LiveRoomVideo">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="course_group_id_" jdbcType="INTEGER" property="courseGroupId"/>
+        <result column="course_id_" jdbcType="INTEGER" property="courseId"/>
+        <result column="room_uid_" jdbcType="VARCHAR" property="roomUid"/>
+        <result column="record_id_" jdbcType="VARCHAR" property="recordId"/>
+        <result column="url_" jdbcType="VARCHAR" property="url"/>
+        <result column="start_time_" jdbcType="TIMESTAMP" property="startTime"/>
+        <result column="end_time_" jdbcType="TIMESTAMP" property="endTime"/>
+        <result column="type" jdbcType="INTEGER" property="type"/>
+        <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id_
+        , course_group_id_, course_id_, room_uid_, record_id_, url_, start_time_, end_time_, type, created_time_
+    </sql>
+
+    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
+            parameterType="com.yonge.cooleshow.biz.dal.entity.LiveRoomVideo">
+        insert into live_room_video(course_group_id_, course_id_, room_uid_, record_id_, url_, start_time_, end_time_,
+        type, created_time_)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.courseGroupId}, #{entity.courseId}, #{entity.roomUid}, #{entity.recordId}, #{entity.url},
+            #{entity.startTime}, #{entity.endTime}, #{entity.type}, #{entity.createdTime})
+        </foreach>
+    </insert>
+
+</mapper>

+ 29 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseGroupController.java

@@ -0,0 +1,29 @@
+package com.yonge.cooleshow.teacher.controller;
+
+
+import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
+import com.yonge.cooleshow.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 课程组表(CourseGroup)表控制层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:10
+ */
+@Api(tags = "课程组表")
+@RestController
+@RequestMapping("/courseGroup")
+public class CourseGroupController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private CourseGroupService courseGroupService;
+
+}
+

+ 29 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CoursePlanController.java

@@ -0,0 +1,29 @@
+package com.yonge.cooleshow.teacher.controller;
+
+
+import com.yonge.cooleshow.biz.dal.service.CoursePlanService;
+import com.yonge.cooleshow.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 课程计划表(CoursePlan)表控制层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+@Api(tags = "课程计划表")
+@RestController
+@RequestMapping("/coursePlan")
+public class CoursePlanController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private CoursePlanService coursePlanService;
+
+}
+

+ 29 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleController.java

@@ -0,0 +1,29 @@
+package com.yonge.cooleshow.teacher.controller;
+
+
+import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
+import com.yonge.cooleshow.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 老师课程表(CourseSchedule)表控制层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:11
+ */
+@Api(tags = "老师课程表")
+@RestController
+@RequestMapping("/courseSchedule")
+public class CourseScheduleController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private CourseScheduleService courseScheduleService;
+
+}
+

+ 28 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleStudentPaymentController.java

@@ -0,0 +1,28 @@
+package com.yonge.cooleshow.teacher.controller;
+
+import com.yonge.cooleshow.biz.dal.service.CourseScheduleStudentPaymentService;
+import com.yonge.cooleshow.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 课程学生缴费表(CourseScheduleStudentPayment)表控制层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:29:12
+ */
+@Api(tags = "课程学生缴费表")
+@RestController
+@RequestMapping("/courseScheduleStudentPayment")
+public class CourseScheduleStudentPaymentController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private CourseScheduleStudentPaymentService courseScheduleStudentPaymentService;
+
+}
+

+ 29 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/LiveRoomController.java

@@ -0,0 +1,29 @@
+package com.yonge.cooleshow.teacher.controller;
+
+
+import com.yonge.cooleshow.biz.dal.entity.LiveRoom;
+import com.yonge.cooleshow.biz.dal.service.LiveRoomService;
+import org.springframework.web.bind.annotation.*;
+import com.yonge.cooleshow.common.controller.BaseController;
+import io.swagger.annotations.Api;
+
+import javax.annotation.Resource;
+
+/**
+ * 直播房间与课程的关系表表(LiveRoom)表控制层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:16
+ */
+@Api(tags = "直播房间与课程的关系表表")
+@RestController
+@RequestMapping("/liveRoom")
+public class LiveRoomController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private LiveRoomService liveRoomService;
+
+}
+

+ 29 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/LiveRoomVideoController.java

@@ -0,0 +1,29 @@
+package com.yonge.cooleshow.teacher.controller;
+
+
+import com.yonge.cooleshow.biz.dal.entity.LiveRoomVideo;
+import com.yonge.cooleshow.biz.dal.service.LiveRoomVideoService;
+import org.springframework.web.bind.annotation.*;
+import com.yonge.cooleshow.common.controller.BaseController;
+import io.swagger.annotations.Api;
+
+import javax.annotation.Resource;
+
+/**
+ * 直播视频记录(LiveRoomVideo)表控制层
+ *
+ * @author hgw
+ * @since 2022-03-18 15:41:17
+ */
+@Api(tags = "直播视频记录")
+@RestController
+@RequestMapping("/liveRoomVideo")
+public class LiveRoomVideoController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private LiveRoomVideoService liveRoomVideoService;
+
+}
+

+ 7 - 12
toolset/utils/src/main/java/com/yonge/toolset/utils/validator/ValidationKit.java

@@ -6,6 +6,7 @@ import org.springframework.validation.BindingResult;
 import org.springframework.validation.FieldError;
 
 import java.util.Objects;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -27,17 +28,7 @@ public class ValidationKit {
      * @param fields 只校验的字段
      */
     public static void validFields(BindingResult result, String... fields) {
-        if (!result.hasFieldErrors()) {
-            return;
-        }
-        Stream<String> stringStream = result.getFieldErrors().stream()
-                .map(FieldError::getField)
-                .filter(field -> ArrayUtils.contains(fields, field));
-
-        String errorCollect = concat(result, stringStream);
-        if (StringUtils.isNotBlank(errorCollect)) {
-            throw new RuntimeException(errorCollect);
-        }
+        checkFields(result, field -> ArrayUtils.contains(fields, field));
     }
 
     /**
@@ -47,12 +38,16 @@ public class ValidationKit {
      * @param ignoreFields 忽略验证的字段
      */
     public static void ignoreFields(BindingResult result, String... ignoreFields) {
+        checkFields(result, field -> !ArrayUtils.contains(ignoreFields, field));
+    }
+
+    private static void checkFields(BindingResult result, Function<String, Boolean> function) {
         if (!result.hasFieldErrors()) {
             return;
         }
         Stream<String> stringStream = result.getFieldErrors().stream()
                 .map(FieldError::getField)
-                .filter(field -> !ArrayUtils.contains(ignoreFields, field));
+                .filter(function::apply);
 
         String errorCollect = concat(result, stringStream);
         if (StringUtils.isNotBlank(errorCollect)) {