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

Merge remote-tracking branch 'origin/master'

zouxuan 3 лет назад
Родитель
Сommit
b244e840ea
68 измененных файлов с 3430 добавлено и 421 удалено
  1. 3 0
      .gitignore
  2. 4 4
      cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetController.java
  3. 100 0
      cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/SysConfigController.java
  4. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseGroupDao.java
  5. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CoursePlanDao.java
  6. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleDao.java
  7. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  8. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/LiveRoomDao.java
  9. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/LiveRoomVideoDao.java
  10. 243 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/CourseGroupDto.java
  11. 2 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/req/TeacherApplyDetailReq.java
  12. 252 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java
  13. 83 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CoursePlan.java
  14. 215 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseSchedule.java
  15. 144 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudentPayment.java
  16. 214 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/LiveRoom.java
  17. 143 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/LiveRoomVideo.java
  18. 5 7
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/MusicSheet.java
  19. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Order.java
  20. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/OrderDetail.java
  21. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/OrderRefunds.java
  22. 136 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotify.java
  23. 59 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotifyConfig.java
  24. 54 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RecordNotifyOutput.java
  25. 95 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RoomSpeakerInfo.java
  26. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Teacher.java
  27. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/TeacherAuthMusicianRecord.java
  28. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/TeacherWithdrawal.java
  29. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/UserAccount.java
  30. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/UserAccountRecord.java
  31. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/UserBankCard.java
  32. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/VipCard.java
  33. 36 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseGroupEnum.java
  34. 50 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseScheduleTypeEnum.java
  35. 48 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/RoomTypeEnum.java
  36. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseGroupService.java
  37. 17 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CoursePlanService.java
  38. 28 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleService.java
  39. 17 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleStudentPaymentService.java
  40. 25 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/LiveRoomService.java
  41. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/LiveRoomVideoService.java
  42. 1 383
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/SysConfigService.java
  43. 44 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java
  44. 30 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CoursePlanServiceImpl.java
  45. 105 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java
  46. 30 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleStudentPaymentServiceImpl.java
  47. 264 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java
  48. 80 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomVideoServiceImpl.java
  49. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherAuthMusicianRecordServiceImpl.java
  50. 190 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/support/WrapperUtil.java
  51. 26 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseCalendarVo.java
  52. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherApplyDetail.java
  53. 46 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml
  54. 26 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CoursePlanMapper.xml
  55. 42 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  56. 33 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  57. 42 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/LiveRoomMapper.xml
  58. 33 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/LiveRoomVideoMapper.xml
  59. 56 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/SysConfigController.java
  60. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseGroupController.java
  61. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CoursePlanController.java
  62. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleController.java
  63. 28 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleStudentPaymentController.java
  64. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/LiveRoomController.java
  65. 29 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/LiveRoomVideoController.java
  66. 56 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/SysConfigController.java
  67. 1 1
      toolset/audit-log/src/main/java/com/yonge/toolset/log/interceptor/AuditLogInterceptor.java
  68. 7 12
      toolset/utils/src/main/java/com/yonge/toolset/utils/validator/ValidationKit.java

+ 3 - 0
.gitignore

@@ -23,6 +23,9 @@ mvnw.cmd
 *.ipr
 /toolset/codegen/src/main/resources/generateConfigration.xml
 /cooleshow-user/user-admin/src/main/resources/bootstrap-dev.yml
+/cooleshow-user/user-student/src/main/resources/bootstrap-dev.yml
+/cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.yml
+/cooleshow-auth/auth-server/src/main/resources/bootstrap-dev.yml
 
 ### 忽略子模块的文件 ###
 **/*.ims

+ 4 - 4
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetController.java

@@ -30,7 +30,7 @@ public class MusicSheetController extends BaseController {
 	@Autowired
 	private MusicSheetService musicSheetService;
 
-	@ApiOperation(value = "新增")
+	@ApiOperation(value = "新增曲谱")
     @PostMapping("/create")
     public Object create(@Valid @RequestBody MusicSheet musicSheet) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
@@ -44,7 +44,7 @@ public class MusicSheetController extends BaseController {
         return succeed();
     }
 
-    @ApiOperation(value = "删除")
+    @ApiOperation(value = "删除曲谱")
     @PostMapping("/delete/{id}")
     public Object delete(@PathVariable Long id) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
@@ -56,7 +56,7 @@ public class MusicSheetController extends BaseController {
         return succeed();
     }
 
-    @ApiOperation(value = "修改")
+    @ApiOperation(value = "修改曲谱")
     @PostMapping("/update")
     public Object update(@Valid @RequestBody MusicSheet musicSheet) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
@@ -73,7 +73,7 @@ public class MusicSheetController extends BaseController {
         return succeed();
     }
 
-    @ApiOperation(value = "分页查询")
+    @ApiOperation(value = "曲谱分页查询")
     @PostMapping("/list")
     public Object list(@RequestBody MusicSheet musicSheet) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();

+ 100 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/SysConfigController.java

@@ -0,0 +1,100 @@
+package com.yonge.cooleshow.admin.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.yonge.cooleshow.biz.dal.entity.SysConfig;
+import com.yonge.cooleshow.biz.dal.service.SysConfigService;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.toolset.log.model.AuditLogAnnotation;
+
+/** 
+ * 系统配置控制层
+ */
+@RestController
+@Api(tags = "系统参数设置")
+@RequestMapping(value = "sysConfig")
+public class SysConfigController extends BaseController {
+
+	@Autowired
+	private SysConfigService sysConfigService;
+
+	@ApiOperation(value = "参数列表")
+	@GetMapping(value = "list")
+    @PreAuthorize("@pcs.hasPermissions('sysConfig/list')")
+	public Object configList(String group) {
+		Map<String,Object> params = new HashMap<String, Object>();
+		params.put("group", group);
+		List<SysConfig> configs = sysConfigService.findAll(params);
+		return succeed(configs);
+	}
+
+	@ApiOperation(value = "修改参数")
+	@PostMapping(value = "update")
+    @PreAuthorize("@pcs.hasPermissions('sysConfig/update')")
+	@AuditLogAnnotation(operateName = "修改参数")
+	public Object update(SysConfig config) {
+		config.setModifyOn(new Date());
+		sysConfigService.updateConfig(config);
+		return succeed();
+	}
+
+	@ApiOperation(value = "修改参数")
+	@PostMapping(value = "batchUpdate")
+    @PreAuthorize("@pcs.hasPermissions('sysConfig/batchUpdate')")
+	@AuditLogAnnotation(operateName = "修改参数")
+	public Object batchUpdate(@RequestBody List<SysConfig> configList) {
+		sysConfigService.batchUpdate(configList);
+		return succeed();
+	}
+
+	@ApiOperation(value = "新增参数")
+	@PostMapping(value = "add")
+    @PreAuthorize("@pcs.hasPermissions('sysConfig/add')")
+	public Object addConfig(SysConfig config) {
+		if (config == null)
+			return failed("参数无效");
+		if (StringUtils.isBlank(config.getParamName())) {
+			return failed("参数名称不能为空");
+		}
+		if (StringUtils.isBlank(config.getParanValue())) {
+			return failed("参数值不能为空");
+		}
+		config.setCreateOn(new Date());
+		config.setModifyOn(new Date());
+		return sysConfigService.insert(config) > 0 ? succeed() : failed("添加失败");
+	}
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "get")
+    @PreAuthorize("@pcs.hasPermissions('sysConfig/get')")
+	public Object getConfig(Long id) {
+		if (id == null || id <= 0)
+			return failed("请检查输入的ID");
+		return succeed(sysConfigService.get(id));
+	}
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "queryByParamName")
+    @PreAuthorize("@pcs.hasPermissions('sysConfig/queryByParamName')")
+	public Object queryByParamName(String paramName) {
+		if(StringUtils.isBlank(paramName)){
+			return failed("参数不能为空");
+		}
+		return succeed(sysConfigService.findByParamName(paramName));
+	}
+}

+ 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;
+    }
+}

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/req/TeacherApplyDetailReq.java

@@ -33,8 +33,8 @@ public class TeacherApplyDetailReq implements Serializable {
     private Integer gender;
 
     @ApiModelProperty(value = "出生日期 ", required = true)
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date birthdate;
 
     @NotBlank(message = "专业技能不能为空")

+ 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;
+    }
+
+}
+

+ 5 - 7
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/MusicSheet.java

@@ -35,21 +35,21 @@ public class MusicSheet extends BaseEntity {
 
     @NotNull(message = "曲谱来源不能为空")
     @TableField("user_id_")
-    @ApiModelProperty(value = "曲谱来源(0:平台;非0:老师ID)")
-    private Long userId;  //曲谱来源(0:平台;非0:老师ID)
+    @ApiModelProperty(value = "曲谱来源(老师ID或后台管理用户ID)")
+    private Long userId;  //曲谱来源(老师ID或后台管理用户ID)
 
     @NotBlank(message = "作曲人不能为空!")
-    @Size(max = 32, message = "作曲人长度不能超过64位!")
+    @Size(max = 32, message = "作曲人长度不能超过32位!")
     @TableField("composer_")
     @ApiModelProperty(value = "作曲人")
     private String composer;  //作曲人
 
-    @NotBlank(message = "作曲人不能为空!")
+    @NotBlank(message = "曲谱声部不能为空!")
     @TableField("music_subject_")
     @ApiModelProperty(value = "曲谱声部(适用的乐器,可能是多个,用逗号分隔)")
     private String musicSubject;  //曲谱声部(适用的乐器,可能是多个,用逗号分隔)
 
-    @NotBlank(message = "作曲人不能为空!")
+    @NotBlank(message = "曲谱音频文件类型不能为空!")
     @TableField("audio_type_")
     @ApiModelProperty(value = "曲谱音频文件类型(midi;mp3)")
     private String audioType;  //曲谱音频文件类型(midi;mp3)
@@ -108,12 +108,10 @@ public class MusicSheet extends BaseEntity {
     @ApiModelProperty(value = "是否自带节拍器(0:否;1:是)")
     private Integer hasBeat;  //是否自带节拍器(0:否;1:是)
 
-    @NotNull(message = "创建时间不能为空!")
     @TableField("create_time_")
     @ApiModelProperty(value = "创建时间")
     private Date createTime;  //创建时间
 
-    @NotNull(message = "创建人不能为空!")
     @TableField("create_by_")
     @ApiModelProperty(value = "创建人(老师或者是后台平台用户)")
     private Long createBy;  //创建人(老师或者是后台平台用户)

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Order.java

@@ -20,7 +20,7 @@ import java.math.BigDecimal;
 @ApiModel(value = "Order对象", description = "平台订单表")
 public class Order implements Serializable {
 	private static final long serialVersionUID = 1L;
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 订单号 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/OrderDetail.java

@@ -19,7 +19,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 @ApiModel(value = "OrderDetail对象", description = "平台订单表")
 public class OrderDetail implements Serializable {
 	private static final long serialVersionUID = 1L;
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 订单号 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/OrderRefunds.java

@@ -20,7 +20,7 @@ import java.math.BigDecimal;
 @ApiModel(value = "OrderRefunds对象", description = "用户退款表")
 public class OrderRefunds implements Serializable {
 	private static final long serialVersionUID = 1L;
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
 	@TableField(value = "user_id_")
     private Long userId;

+ 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;
+    }
+}

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Teacher.java

@@ -26,7 +26,7 @@ public class Teacher implements Serializable {
     * 对应user表用户编号 
     */
     @ApiModelProperty("对应user表用户编号 ")
-    @TableId(value = "user_id_", type = IdType.UUID)
+    @TableId(value = "user_id_", type = IdType.AUTO)
     private Long userId;
     /** 
     * 学历 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/TeacherAuthMusicianRecord.java

@@ -23,7 +23,7 @@ public class TeacherAuthMusicianRecord implements Serializable {
     * 审核单id 
     */
     @ApiModelProperty("审核单id ")
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 对应user表用户编号 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/TeacherWithdrawal.java

@@ -24,7 +24,7 @@ public class TeacherWithdrawal implements Serializable {
     * 提现id 
     */
     @ApiModelProperty("提现id ")
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 用户表id 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/UserAccount.java

@@ -24,7 +24,7 @@ public class UserAccount implements Serializable {
     * 用户表id 
     */
     @ApiModelProperty("用户表id ")
-    @TableId(value = "user_id_", type = IdType.UUID)
+    @TableId(value = "user_id_", type = IdType.AUTO)
     private Long userId;
     /** 
     * 总金额 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/UserAccountRecord.java

@@ -24,7 +24,7 @@ public class UserAccountRecord implements Serializable {
     * 用户表id 
     */
     @ApiModelProperty("用户表id ")
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 交易金额 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/UserBankCard.java

@@ -20,7 +20,7 @@ public class UserBankCard implements Serializable {
     * id 
     */
     @ApiModelProperty("id ")
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 用户表id 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/VipCard.java

@@ -23,7 +23,7 @@ public class VipCard implements Serializable {
     * 会员卡id 
     */
     @ApiModelProperty("会员卡id ")
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /** 
     * 用户id 

+ 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);
+}
+

+ 1 - 383
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/SysConfigService.java

@@ -6,390 +6,8 @@ import com.yonge.cooleshow.biz.dal.entity.SysConfig;
 import com.yonge.cooleshow.common.service.BaseService;
 
 public interface SysConfigService extends BaseService<Long, SysConfig> {
-    //乐团基础规则
 
-    //乐团预报名人数达到指定数量,可将乐团状态变更为创建缴费中
-    String MUSIC_MIN_STUDENT_NUM = "music_min_student_num";
-    //报名缴费阶段乐团若未合并学员,缴费人数达到指定人数时可确认开团(用于校验是否回访)
-    String NEW_MUSIC_PAYMENT_STUDENT_NUM = "new_music_payment_student_num";
-    //报名缴费阶段乐团若合并学员,缴费人数达到指定人数时可确认开团(用于校验是否回访)
-    String OLD_MUSIC_PAYMENT_STUDENT_NUM = "old_music_payment_student_num";
-    //乐团问卷调查编号
-    String MUSIC_GROUP_TOPIC_ID = "music_group_topic_id";
-
-    //考勤和课酬规则
-
-    //线下课课程开始前指定时间打卡为正常签到
-    String OFFLINE_ADVANCE_SIGN_IN_MINUTES = "offline_advance_sign_in_minutes";
-    //线下课课程开始后指定时间内签到为迟到
-    String OFFLINE_ADVANCE_SIGN_IN_LATE_MINUTES = "offline_advance_sign_in_late_minutes";
-    //线下课课程结束前指定时间签退为异常
-    String OFFLINE_ADVANCE_SIGN_OUT_MINUTES = "offline_advance_sign_out_minutes";
-    //线下课老师异常签到扣减课酬金额
-    String OFFLINE_ERROR_SIGN_IN_CUT_SALARY = "offline_error_sign_in_cut_salary";
-    //线下课老师异常签到扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_ERROR_SIGN_IN_CUT_SALARY_UNIT = "offline_error_sign_in_cut_salary_unit";
-    //线下课老师迟到扣减课酬金额
-    String OFFLINE_LATE_CUT_SALARY = "offline_late_cut_salary";
-    //线下课老师迟到扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_LATE_CUT_SALARY_UNIT = "offline_late_cut_salary_unit";
-    //线下课老师旷课扣减课酬金额
-    String OFFLINE_LEVEL_SIGN_IN_CUT_SALARY = "offline_level_sign_in_cut_salary";
-    //线下课老师旷课扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_LEVEL_SIGN_IN_CUT_SALARY_UNIT = "offline_level_sign_in_cut_salary_unit";
-    //线下课老师旷课扣减课酬金额
-    String OFFLINE_NO_SIGN_IN_CUT_SALARY = "offline_no_sign_in_cut_salary";
-    //线下课老师旷课扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_NO_SIGN_IN_CUT_SALARY_UNIT = "offline_no_sign_in_cut_salary_unit";
-    //线下课老师异常签退扣减课酬金额
-    String OFFLINE_ERROR_SIGN_OUT_CUT_SALARY = "offline_error_sign_out_cut_salary";
-    //线下课老师异常签退扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_ERROR_SIGN_OUT_CUT_SALARY_UNIT = "offline_error_sign_out_cut_salary_unit";
-    //线下课老师异常签退扣减课酬金额
-    String OFFLINE_EARLY_SIGN_OUT_CUT_SALARY = "offline_early_sign_out_cut_salary";
-    //线下课老师异常签退扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_EARLY_SIGN_OUT_CUT_SALARY_UNIT = "offline_early_sign_out_cut_salary_unit";
-    //线下课老师异常签退扣减课酬金额
-    String OFFLINE_NO_SIGN_OUT_CUT_SALARY = "offline_no_sign_out_cut_salary";
-    //线下课老师异常签退扣减课酬单位(1、元,2、百分比)
-    String OFFLINE_NO_SIGN_OUT_CUT_SALARY_UNIT = "offline_no_sign_out_cut_salary_unit";
-    //vip课开课前可点名时间段,开课前{}分钟
-    String ENABLE_STUDENT_ATTENDANCE_BEFOR_COURSE_START_TIME_RANGE_VIP = "enable_student_attendance_befor_course_start_time_range_vip";
-    //vip课程可更新学生签到状态时间限制,课程结束后{}分钟
-    String ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP = "enable_student_attendance_time_range_vip";
-    //如果没有签退,{}分钟后自动发送推送信息
-    String SIGN_OUT_MESSAGE_PUSH_MINUTE = "sign_out_message_push_minute";
-    //乐团课老师课程结束后可正常签退时间范围为课程结束后{}分钟内
-    String ADVANCE_SIGN_OUT_MINUTES = "advance_sign_out_minutes";
-
-    //线上连堂课间隔时间
-    String ONLINE_CONTINUE_COURSE_TIME = "online_continue_course_time";
-    //线上课课程开始前指定时间打卡为正常签到
-    String ONLINE_ADVANCE_SIGN_IN_MINUTES = "online_advance_sign_in_minutes";
-    //线上课课程开始后指定时间内签到为迟到
-    String ONLINE_ADVANCE_SIGN_IN_LATE_MINUTES = "online_advance_sign_in_late_minutes";
-    //线上课课程结束前指定时间内签退为早退
-    String ONLINE_EARLY_SIGN_OUT_MINUTES = "online_early_sign_out_minutes";
-    //线上课老师迟到扣减课酬金额
-    String ONLINE_LATE_CUT_SALARY = "online_late_cut_salary";
-    //线上课老师迟到扣减课酬单位(1、元,2、百分比)
-    String ONLINE_LATE_CUT_SALARY_UNIT = "online_late_cut_salary_unit";
-    //线上课老师旷课扣减课酬金额
-    String ONLINE_LEVEL_SIGN_IN_CUT_SALARY = "online_level_sign_in_cut_salary";
-    //线上课老师旷课扣减课酬单位(1、元,2、百分比)
-    String ONLINE_LEVEL_SIGN_IN_CUT_SALARY_UNIT = "online_level_sign_in_cut_salary_unit";
-    //线上课老师旷课扣减课酬金额
-    String ONLINE_NO_SIGN_IN_CUT_SALARY = "online_no_sign_in_cut_salary";
-    //线上课老师旷课扣减课酬单位(1、元,2、百分比)
-    String ONLINE_NO_SIGN_IN_CUT_SALARY_UNIT = "online_no_sign_in_cut_salary_unit";
-    //线上课老师异常签退扣减课酬金额
-    String ONLINE_ERROR_SIGN_OUT_CUT_SALARY = "online_error_sign_out_cut_salary";
-    //线上课老师异常签退扣减课酬单位(1、元,2、百分比)
-    String ONLINE_ERROR_SIGN_OUT_CUT_SALARY_UNIT = "online_error_sign_out_cut_salary_unit";
-    //线上课老师早退扣减课酬金额
-    String ONLINE_EARLY_SIGN_OUT_CUT_SALARY = "online_early_sign_out_cut_salary";
-    //线上课老师早退扣减课酬单位(1、元,2、百分比)
-    String ONLINE_EARLY_SIGN_OUT_CUT_SALARY_UNIT = "online_early_sign_out_cut_salary_unit";
-    //线上课老师未签退扣减课酬金额
-    String ONLINE_NO_SIGN_OUT_CUT_SALARY = "online_no_sign_out_cut_salary";
-    //线上课老师未签退扣减课酬单位(1、元,2、百分比)
-    String ONLINE_NO_SIGN_OUT_CUT_SALARY_UNIT = "online_no_sign_out_cut_salary_unit";
-
-    //线下课老师可以打卡范围,GPS定位距离教学点距离
-    String ATTENDANCE_RANGE = "attendance_range";
-    //线下课签到定位异常扣除金额
-    String OFFLINE_SIGN_IN_GPS_ERROR_CUT_SALARY = "offline_sign_in_gps_error_cut_salary";
-    //线下课签到定位异常扣除金额
-    String OFFLINE_SIGN_IN_GPS_ERROR_CUT_SALARY_UNIT = "offline_sign_in_gps_error_cut_salary_unit";
-    //线下课签退定位异常扣除金额
-    String OFFLINE_SIGN_OUT_GPS_ERROR_CUT_SALARY = "offline_sign_out_gps_error_cut_salary";
-    //线下课签退定位异常扣除金额
-    String OFFLINE_SIGN_OUT_GPS_ERROR_CUT_SALARY_UNIT = "offline_sign_out_gps_error_cut_salary_unit";
-    //vip线下课点名定位异常扣除金额
-    String VIP_OFFLINE_GPS_ERROR_CUT_SALARY = "vip_offline_gps_error_cut_salary";
-    //vip线下课点名定位异常扣除金额单位
-    String VIP_OFFLINE_GPS_ERROR_CUT_SALARY_UNIT = "vip_offline_gps_error_cut_salary_unit";
-    //vip线下课未点名扣除金额
-    String VIP_OFFLINE_NO_GPS_ERROR_CUT_SALARY = "vip_offline_no_gps_error_cut_salary";
-    //vip线下课未点名扣除金额单位
-    String VIP_OFFLINE_NO_GPS_ERROR_CUT_SALARY_UNIT = "vip_offline_no_gps_error_cut_salary_unit";
-
-    //试用期老师课酬发放百分比
-    String PROBATION_TEACHER_SALARY = "probation_teacher_salary";
-
-    //老师端可申诉考勤时间限制(天)
-    String TEACHER_APP_SALARY_COMPLAINTS_TIME = "teacher_app_salary_complaints_time";
-    //后台老师考勤申诉时间限制
-    String WEB_TEACHER_COMPLAINTS_SALARY = "web_teacher_complaints_salary";
-
-    //线下连堂课间隔时间
-    String OFFLINE_CONTINUE_COURSE_MINUTES = "offline_continue_course_minutes";
-    //学生允许请假的时间,为开课前{}小时
-    String ADVANCE_LEAVE_HOURS = "advance_leave_hours";
-    //教师可调整课程默认时间,开课前{}小时
-    String ENABLE_TEACHER_COURSE_ADJUST_DEFAULT_HOURS = "enable_teacher_course_adjust_default_hours";
-    //退款周期
-    String REFUND_PERIOD = "refund_period";
-
-    //服务异常提醒
-    //学员当月请假指定次数及以上提醒异常请假
-    String STUDENT_ERROR_LEAVE_NUM = "student_error_leave_num";
-    //上课时间在指定时间段内提醒时间安排异常
-    String COURSE_START_TIME_ERROR = "course_start_time_error";
-    //上课时间在指定时间段内提醒时间安排异常
-    String COURSE_END_TIME_ERROR = "course_end_time_error";
-
-    //乐保
-    //是否开启乐保
-    String MUSICAL_REPAIR_OPEN_FLAG = "musical_repair_open_flag";
-    //一年期乐保零售价
-    String ONE_YEAR_MUSICAL_REPAIR_AMOUNT = "one_year_musical_repair_amount";
-    //一年期乐保原价
-    String ONE_YEAR_MUSICAL_REPAIR_ORIGINAL_AMOUNT = "one_year_musical_repair_original_amount";
-
-
-    //特殊规则默认值--》网管&试听课规则
-    //试听课默认单节课时长
-    String DEMO_GROUP_SINGLE_CLASS_MINUTES_ = "demo_group_single_class_minutes_";
-    //陪练课可选老师的分部
-    String PRACTICE_TEACHER_ORGAN_RANGE = "practice_teacher_organ_range";
-    //陪练课可预约声部列表
-    String PRACTICE_SUBJECT_ID_LIST = "practice_subject_id_list";
-    //陪练课预约开始时间
-//    String PRACTICE_APPLY_START_TIME = "practice_apply_start_time";
-    //陪练课预约结束时间
-//    String PRACTICE_APPLY_END_TIME = "practice_apply_end_time";
-
-    //特殊规则默认值--》商品规则设置
-    //内部库存预警值
-    String INNER_REPERTORY_WARN_NUM = "inner_repertory_warn_num";
-    //外部库存预警值
-    String OUTER_REPERTORY_WARN_NUM = "outer_repertory_warn_num";
-    //库存预警手机号
-    String REPERTORY_WARN_PHONE = "repertory_warn_phone";
-
-    //课程默认值规则---》乐团规则设置
-    //自动确认收货时间
-    String AUTO_AFFIRM_RECEIVE_TIME = "auto_affirm_receive_time";
-    //提醒老师创建新的缴费项目,距离缴费项有效期前{}天
-    String PUSH_CREATE_PAYMENT_CALENDER = "push_create_payment_calender";
-    //提醒乐团主管排下学期的课程的时间节点(默认提前14天)
-    String REMIND_COURSE_TIME = "remind_course_time";
-    //会员结束前15天自动创建乐团续费(默认提前15天)
-    String AUTO_CREATE_MEMBER_RENEW = "auto_create_member_renew";
-    //会员团每学期赠送课程分钟数
-    String MEMBER_GROUP_TERM_GIVE_COURSE_TIME = "member_group_term_give_course_time";
-    //各声部不购买会员入团资格限制学员数
-    String MEMBER_GROUP_FEE_STUDENT_NUM = "member_group_fee_student_num";
-
-
-    //乐团所有未开始课程组、商品等服务及产品退费时,退费金额扣减百分比(默认0.005)
-    String MUSIC_RETURN_FEE_CHARGES = "music_return_fee_charges";
-    //乐团课退费时若课程组已开始,退费金额扣减百分比(默认0.8)
-    String MUSIC_COURSE_START_RETURN_FEE_CHARGES = "music_course_start_return_fee_charges";
-    //1v1小班课退费时若课程组已开始,退费金额扣减百分比(默认0.8)
-    String VIP_1V1_COURSE_NOT_START_RETURN_FEE_CHARGES = "VIP_1V1_COURSE_NOT_START_RETURN_FEE_CHARGES";
-    //1vn小班课退费时若课程组已开始,退费金额扣减百分比(默认0.7)
-    String VIP_1VN_COURSE_NOT_START_RETURN_FEE_CHARGES = "VIP_1VN_COURSE_NOT_START_RETURN_FEE_CHARGES";
-
-
-    public static final String BASE_API_URL = "base_api_url";
-
-    /**
-     * 缴费状态提前{}天刷新
-     */
-    public static final String REFRESH_PAYMENT_STATUS_EARLY_DAYS = "refresh_payment_status_early_days";
-
-    /**
-     * VIP课结束后,用户可申诉时间,为课程结束后的{}天
-     */
-    public static final String VIP_APPEAL_DAYS_RANGE = "vip_appeal_days_range";
-
-    /**
-     * 线下课最早打卡时间可提前分钟数
-     */
-    String OFFLINE_SIGN_IN_EARLY_FORWARD_TIME = "offline_sign_in_early_forward_time";
-
-    /**
-     * 最早请假提前时间
-     */
-    String EARLIEST_TIME_FOR_LEAVE="earliest_time_for_leave";
-
-
-    /**
-     * 单技课梯度结算规则设置
-     */
-    public static final String SIGLE_GRADIENT_SETTLEMENT_RULE = "sigle_gradient_settlement_rule";
-
-    /**
-     * 合奏课梯度结算规则设置
-     */
-    public static final String MAX_GRADIENT_SETTLEMENT_RULE = "max_gradient_settlement_rule";
-
-    /**
-     * 小班课梯度结算规则设置
-     */
-    public static final String HIGH_GRADIENT_SETTLEMENT_RULE = "high_gradient_settlement_rule";
-
-    String STUDENT_APPLY_URL = "student_apply_url";
-    String SERVER_PHONE = "server_phone";
-
-    String MUSIC_GROUP_SETTLEMENT_CLASS_MINUTES = "music_group_settlement_class_minutes";
-
-    String MUSIC_GROUP_SETTLEMENT_DAY = "music_group_settlement_day";
-
-    String MUSIC_GROUP_SETTLEMENT_SINGLE_CLASS_MINUTES = "music_group_settlement_single_class_minutes";
-
-    /**
-     * 可签退时间限制(自然天)
-     */
-    String ENABLE_SIGN_OUT_TIME_RANGE = "enable_sign_out_time_range";
-
-    /**
-     * 可更新学生签到状态时间限制,课程结束后{}分钟(和前端核实过,乐团的已弃用)
-     */
-    String ENABLE_STUDENT_ATTENDANCE_TIME_RANGE = "enable_student_attendance_time_range";
-
-    /**
-     * @describe 陪练课课酬
-     */
-    String PRACTICE_COURSE_SALARY = "practice_course_salary";
-
-    /**
-     * @describe 陪练课时长
-     */
-    String PRACTICE_COURSE_MINUTES = "practice_course_minutes";
-
-    /**
-     * @describe 陪练课预约时间间隔
-     */
-    String PRACTICE_APPLY_INTERVAL_TIME = "practice_apply_interval_time";
-
-    /**
-     * @describe 教师请假数据
-     */
-    String TEACHER_LEAVE_DATA = "teacher_leave_data";
-
-    /**
-     * 十分钟内最大可发送的短信次数
-     */
-    String SMS_MAX_TIMES = "sms_max_times";
-
-
-    /**
-     * 连堂课间隔时间
-     */
-    String AUTO_CLOSE_NETWORK_ROOM = "auto_close_network_room";
-
-    /**
-     * @describe 付费陪练课可购买最大月数
-     */
-    String PRACTICE_PAY_MAX_MONTH = "practice_pay_max_month";
-
-    /**
-     * @describe 付费陪练课单月上课数量
-     */
-    String PRACTICE_PAY_DRILL_TIMES_ON_ONE_WEEK = "practice_pay_drill_times_on_one_week";
-
-    /**
-     * @describe 付费陪练课活动截至日期
-     */
-    String PRACTICE_BUY_ACTIVITY_EXPIRE_DATE = "practice_buy_activity_expire_date";
-
-    /**
-     * 陪练老师端入口地址
-     */
-    String TEACHER_STUDY_REPORT_URL = "teacher_study_report_url";
-
-    /**
-     * 陪练课报告地址
-     */
-    String STUDENT_STUDY_REPORT_URL = "student_study_report_url";
-
-    /**
-     * @describe 陪练课续费地址
-     */
-    String PRACTICE_RENEW_URL = "practice_renew_url";
-
-    /**
-     * @describe 老师端baseUrl
-     */
-    String TEACHER_BASE_URL = "teacher_base_url";
-
-    String PRACTICE_PROMOTION_ACTIVITY_START_DATE = "practice_promotion_activity_start_date";
-
-    String NEW_MSG_PUSH = "您收到一条训练回复,请点击查看";
-
-    /**
-     * @describe 教务端baseUrl
-     */
-    String EDU_TEACHER_BASE_URL = "edu_teacher_base_url";
-
-    String HOLIDAY_SETTING = "holiday_setting";
-
-    String PRACTICE_FREE_APPLY_EXPIRE_DATE = "practice_free_apply_expire_date";
-    
-    String START_TIME_OF_1111 = "start_time_of_1111";
-    
-    String END_TIME_OF_1111 = "end_time_of_1111";
-
-    String VIP_SPECIAL_ACTIVITY_IDS = "vip_special_activity_ids";
-
-    //特殊规则默认值--》其他参数设置
-    //基本课酬{}元
-    String DAYA_BASE_SALARY_AMOUNT = "daya_base_salary_amount";
-    //对外课程课后缓冲时间{}分钟
-    String COURSE_BEFORE_BUFFER_TIME = "course_before_buffer_time";
-    //对外课程课后缓冲时间{}分钟
-    String COURSE_AFTER_BUFFER_TIME = "course_after_buffer_time";
-    //全职资源公摊金额
-    String FULL_JOB_FEE = "full_job_fee";
-    //云教练训练时长小于80分钟需要回访
-    String STUDENT_CLOUD_TEACHER_TOTAL_PLAY_TIME = "student_cloud_teacher_total_play_time";
-    //云教练训练次数小于4次需要回访
-    String STUDENT_CLOUD_TEACHER_TRAIN_NUM = "student_cloud_teacher_train_num";
-    //考级活动开始时间
-    String DEGREE_ACTIVITY_START_TIME = "degree_activity_start_time";
-    //考级活动开始时间
-    String DEGREE_ACTIVITY_END_TIME = "degree_activity_end_time";
-    //支持考级活动报名的分部列表
-    String DEGREE_SUPPORT_ORGAN_LIST = "degree_support_organ_list";
-
-
-
-    String WARNING_MIN_COURSE_SALARY = "warning_min_course_salary";
-
-    //会员结束前15天提醒学员续费(默认提前15天)
-    String PUSH_MEMBER_RENEW = "push_member_renew";
-
-    //试用会员结束前3天提醒学员续费(默认提前3天)
-    String EXPERIENCE_PUSH_MEMBER_RENEW = "experience_push_member_renew";
-
-    //云教练活动分部目标JSON
-    String CLOUD_TEACHER_ACTIVE_TARGET = "cloud_teacher_active_target";
-
-    //会员结束前15天提醒学员续费(默认提前5天)
-    String PUSH_MEMBER_RENEW_AGAIN = "push_member_renew_again";
-
-    //会员结束前5天提醒学员续费(退团提醒)(默认提前5天)
-    String PUSH_MEMBER_RENEW_QUIT = "push_member_renew_quit";
-
-    String CHILDREN_DAY_VIP_ACTIVITY_IDS = "children_day_vip_activity_ids";
-
-    //云教练作业开关0关1开
-    String HOMEWORK_OPEN_FLAG = "homework_open_flag";
-
-    //云教练免费体验开关0关1开
-    String FREE_CLOUD_OPEN_FLAG = "free_cloud_open_flag";
-
-    //云教练试用时间最晚截止时间
-    String EXPERIENCE_MEMBERSHIP_END_TIME = "experience_membership_end_time";
-
-    //小课收入是否由平台收款
-    String IS_OPEN_SMALL_CLASS_INCOME_TO_PLATFORM = "is_open_small_class_income_to_platform";
-
-    //平台收款账户
-    String PLATFORM_PAYEE_ACCOUNT = "platform_payee_account";
+	public static final String SMS_MAX_TIMES = "sms_max_times";
 
     /**
      * @return com.ym.mec.biz.dal.entity.SysConfig

+ 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);
+                }
+
+            }
+        }
+    }
+
+}
+

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherAuthMusicianRecordServiceImpl.java

@@ -44,7 +44,7 @@ public class TeacherAuthMusicianRecordServiceImpl extends ServiceImpl<TeacherAut
     @Override
     public Integer getMusicianAuthStatus(Long id) {
         Teacher teacher = teacherService.getById(id);
-        return teacher.getMusicianAuthStatus();
+        return null == teacher ? 0 : teacher.getMusicianAuthStatus();
     }
 
     @Override

+ 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;
+
+
+
+}

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherApplyDetail.java

@@ -18,7 +18,7 @@ public class TeacherApplyDetail implements Serializable {
      * 审核单id
      */
     @ApiModelProperty("审核单id ")
-    @TableId(value = "id_", type = IdType.UUID)
+    @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /**
      * 对应user表用户编号

+ 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>

+ 56 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/SysConfigController.java

@@ -0,0 +1,56 @@
+package com.yonge.cooleshow.student.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.yonge.cooleshow.biz.dal.entity.SysConfig;
+import com.yonge.cooleshow.biz.dal.service.SysConfigService;
+import com.yonge.cooleshow.common.controller.BaseController;
+
+/** 
+ * 系统配置控制层
+ */
+@RestController
+@Api(tags = "系统参数设置")
+@RequestMapping(value = "sysConfig")
+public class SysConfigController extends BaseController {
+
+	@Autowired
+	private SysConfigService sysConfigService;
+
+	@ApiOperation(value = "参数列表")
+	@GetMapping(value = "list")
+	public Object configList(String group) {
+		Map<String,Object> params = new HashMap<String, Object>();
+		params.put("group", group);
+		List<SysConfig> configs = sysConfigService.findAll(params);
+		return succeed(configs);
+	}
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "get")
+	public Object getConfig(Long id) {
+		if (id == null || id <= 0)
+			return failed("请检查输入的ID");
+		return succeed(sysConfigService.get(id));
+	}
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "queryByParamName")
+	public Object queryByParamName(String paramName) {
+		if(StringUtils.isBlank(paramName)){
+			return failed("参数不能为空");
+		}
+		return succeed(sysConfigService.findByParamName(paramName));
+	}
+}

+ 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;
+
+}
+

+ 56 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/SysConfigController.java

@@ -0,0 +1,56 @@
+package com.yonge.cooleshow.teacher.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.yonge.cooleshow.biz.dal.entity.SysConfig;
+import com.yonge.cooleshow.biz.dal.service.SysConfigService;
+import com.yonge.cooleshow.common.controller.BaseController;
+
+/** 
+ * 系统配置控制层
+ */
+@RestController
+@Api(tags = "系统参数设置")
+@RequestMapping(value = "sysConfig")
+public class SysConfigController extends BaseController {
+
+	@Autowired
+	private SysConfigService sysConfigService;
+
+	@ApiOperation(value = "参数列表")
+	@GetMapping(value = "list")
+	public Object configList(String group) {
+		Map<String,Object> params = new HashMap<String, Object>();
+		params.put("group", group);
+		List<SysConfig> configs = sysConfigService.findAll(params);
+		return succeed(configs);
+	}
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "get")
+	public Object getConfig(Long id) {
+		if (id == null || id <= 0)
+			return failed("请检查输入的ID");
+		return succeed(sysConfigService.get(id));
+	}
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "queryByParamName")
+	public Object queryByParamName(String paramName) {
+		if(StringUtils.isBlank(paramName)){
+			return failed("参数不能为空");
+		}
+		return succeed(sysConfigService.findByParamName(paramName));
+	}
+}

+ 1 - 1
toolset/audit-log/src/main/java/com/yonge/toolset/log/interceptor/AuditLogInterceptor.java

@@ -145,7 +145,7 @@ public class AuditLogInterceptor extends HandlerInterceptorAdapter {
         auditLog.setUsername(username);
         auditLog.setUserId(userId);
         auditLog.setOperateTime(sdf.format(new Date()));
-        auditLogService.insert(auditLog);
+        //auditLogService.insert(auditLog);
     }
 
     public void setUsername(String username, Long userId) {

+ 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)) {