he2802 4 роки тому
батько
коміт
a1f9d347d6
20 змінених файлів з 804 додано та 201 видалено
  1. 112 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/course/CourseSectionBusinessController.java
  2. 112 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/course/CourseSectionController.java
  3. 31 20
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionAddBo.java
  4. 33 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionBusinessAddBo.java
  5. 41 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionBusinessEditBo.java
  6. 51 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionBusinessQueryBo.java
  7. 42 23
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionEditBo.java
  8. 32 13
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionQueryBo.java
  9. 21 32
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/domain/CourseSection.java
  10. 37 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/domain/CourseSectionBusiness.java
  11. 14 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseSectionBusinessMapper.java
  12. 1 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseSectionMapper.java
  13. 52 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseSectionBusinessService.java
  14. 1 3
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseSectionService.java
  15. 99 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionBusinessServiceImpl.java
  16. 13 36
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionServiceImpl.java
  17. 43 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/CourseSectionBusinessVo.java
  18. 42 28
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/CourseSectionVo.java
  19. 16 0
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseSectionBusinessMapper.xml
  20. 11 36
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseSectionMapper.xml

+ 112 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/course/CourseSectionBusinessController.java

@@ -0,0 +1,112 @@
+package com.zhongzheng.controller.course;
+
+import java.util.List;
+import java.util.Arrays;
+
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessAddBo;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessEditBo;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessQueryBo;
+import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
+import com.zhongzheng.modules.course.vo.CourseSectionBusinessVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.poi.ExcelUtil;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 课程节适用业务关系Controller
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Api(value = "课程节适用业务关系控制器", tags = {"课程节适用业务关系管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/system/business")
+public class CourseSectionBusinessController extends BaseController {
+
+    private final ICourseSectionBusinessService iCourseSectionBusinessService;
+
+    /**
+     * 查询课程节适用业务关系列表
+     */
+    @ApiOperation("查询课程节适用业务关系列表")
+    @PreAuthorize("@ss.hasPermi('system:business:list')")
+    @GetMapping("/list")
+    public TableDataInfo<CourseSectionBusinessVo> list(CourseSectionBusinessQueryBo bo) {
+        startPage();
+        List<CourseSectionBusinessVo> list = iCourseSectionBusinessService.queryList(bo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出课程节适用业务关系列表
+     */
+   /* @ApiOperation("导出课程节适用业务关系列表")
+    @PreAuthorize("@ss.hasPermi('system:business:export')")
+    @Log(title = "课程节适用业务关系", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult<CourseSectionBusinessVo> export(CourseSectionBusinessQueryBo bo) {
+        List<CourseSectionBusinessVo> list = iCourseSectionBusinessService.queryList(bo);
+        ExcelUtil<CourseSectionBusinessVo> util = new ExcelUtil<CourseSectionBusinessVo>(CourseSectionBusinessVo.class);
+        return util.exportExcel(list, "课程节适用业务关系");
+    }*/
+
+    /**
+     * 获取课程节适用业务关系详细信息
+     */
+    @ApiOperation("获取课程节适用业务关系详细信息")
+    @PreAuthorize("@ss.hasPermi('system:business:query')")
+    @GetMapping("/{id}")
+    public AjaxResult<CourseSectionBusinessVo> getInfo(@PathVariable("id" ) Long id) {
+        return AjaxResult.success(iCourseSectionBusinessService.queryById(id));
+    }
+
+    /**
+     * 新增课程节适用业务关系
+     */
+    @ApiOperation("新增课程节适用业务关系")
+    @PreAuthorize("@ss.hasPermi('system:business:add')")
+    @Log(title = "课程节适用业务关系", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public AjaxResult<Void> add(@RequestBody CourseSectionBusinessAddBo bo) {
+        return toAjax(iCourseSectionBusinessService.insertByAddBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 修改课程节适用业务关系
+     */
+    @ApiOperation("修改课程节适用业务关系")
+    @PreAuthorize("@ss.hasPermi('system:business:edit')")
+    @Log(title = "课程节适用业务关系", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult<Void> edit(@RequestBody CourseSectionBusinessEditBo bo) {
+        return toAjax(iCourseSectionBusinessService.updateByEditBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 删除课程节适用业务关系
+     */
+    @ApiOperation("删除课程节适用业务关系")
+    @PreAuthorize("@ss.hasPermi('system:business:remove')")
+    @Log(title = "课程节适用业务关系" , businessType = BusinessType.DELETE)
+    @PostMapping("/del/{ids}")
+    public AjaxResult<Void> remove(@PathVariable Long[] ids) {
+        return toAjax(iCourseSectionBusinessService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
+    }
+}

+ 112 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/course/CourseSectionController.java

@@ -0,0 +1,112 @@
+package com.zhongzheng.controller.course;
+
+import java.util.List;
+import java.util.Arrays;
+
+import com.zhongzheng.modules.course.bo.CourseSectionAddBo;
+import com.zhongzheng.modules.course.bo.CourseSectionEditBo;
+import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
+import com.zhongzheng.modules.course.service.ICourseSectionService;
+import com.zhongzheng.modules.course.vo.CourseSectionVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.poi.ExcelUtil;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 课程小节Controller
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Api(value = "课程小节控制器", tags = {"课程小节管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/system/section")
+public class CourseSectionController extends BaseController {
+
+    private final ICourseSectionService iCourseSectionService;
+
+    /**
+     * 查询课程小节列表
+     */
+    @ApiOperation("查询课程小节列表")
+    @PreAuthorize("@ss.hasPermi('system:section:list')")
+    @GetMapping("/list")
+    public TableDataInfo<CourseSectionVo> list(CourseSectionQueryBo bo) {
+        startPage();
+        List<CourseSectionVo> list = iCourseSectionService.queryList(bo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出课程小节列表
+     */
+    /*@ApiOperation("导出课程小节列表")
+    @PreAuthorize("@ss.hasPermi('system:section:export')")
+    @Log(title = "课程小节", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult<CourseSectionVo> export(CourseSectionQueryBo bo) {
+        List<CourseSectionVo> list = iCourseSectionService.queryList(bo);
+        ExcelUtil<CourseSectionVo> util = new ExcelUtil<CourseSectionVo>(CourseSectionVo.class);
+        return util.exportExcel(list, "课程小节");
+    }*/
+
+    /**
+     * 获取课程小节详细信息
+     */
+    @ApiOperation("获取课程小节详细信息")
+    @PreAuthorize("@ss.hasPermi('system:section:query')")
+    @GetMapping("/{sectionId}")
+    public AjaxResult<CourseSectionVo> getInfo(@PathVariable("sectionId" ) Long sectionId) {
+        return AjaxResult.success(iCourseSectionService.queryById(sectionId));
+    }
+
+    /**
+     * 新增课程小节
+     */
+    @ApiOperation("新增课程小节")
+    @PreAuthorize("@ss.hasPermi('system:section:add')")
+    @Log(title = "课程小节", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public AjaxResult<Void> add(@RequestBody CourseSectionAddBo bo) {
+        return toAjax(iCourseSectionService.insertByAddBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 修改课程小节
+     */
+    @ApiOperation("修改课程小节")
+    @PreAuthorize("@ss.hasPermi('system:section:edit')")
+    @Log(title = "课程小节", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult<Void> edit(@RequestBody CourseSectionEditBo bo) {
+        return toAjax(iCourseSectionService.updateByEditBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 删除课程小节
+     */
+   /* @ApiOperation("删除课程小节")
+    @PreAuthorize("@ss.hasPermi('system:section:remove')")
+    @Log(title = "课程小节" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{sectionIds}")
+    public AjaxResult<Void> remove(@PathVariable Long[] sectionIds) {
+        return toAjax(iCourseSectionService.deleteWithValidByIds(Arrays.asList(sectionIds), true) ? 1 : 0);
+    }*/
+}

+ 31 - 20
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionAddBo.java

@@ -4,9 +4,6 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotBlank;
 import java.util.Date;
 
 
@@ -15,38 +12,52 @@ import java.util.Date;
  * 课程小节添加对象 course_section
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 @Data
 @ApiModel("课程小节添加对象")
 public class CourseSectionAddBo {
 
-    /** 大章ID */
-    @ApiModelProperty("大章ID")
-    @Min(value = 1, message = "大章ID不能为空")
-    private Long chapterId;
     /** 名称 */
     @ApiModelProperty("名称")
-    @NotBlank(message = "小节名称不能为空")
     private String name;
-    /** 视频地址 */
-    @ApiModelProperty("视频地址")
-    private String videoUrl;
-    /** 时长(秒数) */
-    @ApiModelProperty("时长(秒数)")
-    private Long videoTime;
+    /** 排序 */
+    @ApiModelProperty("排序")
+    private Long sort;
     /** 添加时间 */
     @ApiModelProperty("添加时间")
     private Long createTime;
     /** 修改时间 */
     @ApiModelProperty("修改时间")
     private Long updateTime;
+    /** 前缀名称 */
+    @ApiModelProperty("前缀名称")
+    private String prefixName;
     /** 状态 1正常 0关闭 */
     @ApiModelProperty("状态 1正常 0关闭")
     private Integer status;
-    @ApiModelProperty("排序")
-    private Long sort;
-    @ApiModelProperty("保利威视频ID")
-    @NotBlank(message = "保利威视频ID不能为空")
-    private String vid;
+    /** 节类型 1录播 2直播 3回放 */
+    @ApiModelProperty("节类型 1录播 2直播 3回放")
+    private Integer sectionType;
+    /** 发布状态 1发布 0未发布 */
+    @ApiModelProperty("发布状态 1发布 0未发布")
+    private Integer publishStatus;
+    /** 直播流地址 */
+    @ApiModelProperty("直播流地址")
+    private String liveUrl;
+    /** 直播开始时间 */
+    @ApiModelProperty("直播开始时间")
+    private Long liveStartTime;
+    /** 直播结束时间 */
+    @ApiModelProperty("直播结束时间")
+    private Long liveEndTime;
+    /** 直播节时长(分钟) */
+    @ApiModelProperty("直播节时长(分钟)")
+    private Long liveDuration;
+    /** 录播和回放的url地址 */
+    @ApiModelProperty("录播和回放的url地址")
+    private String recordingUrl;
+    /** 录播和回放节时长(分钟) */
+    @ApiModelProperty("录播和回放节时长(分钟)")
+    private Long recordingDuration;
 }

+ 33 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionBusinessAddBo.java

@@ -0,0 +1,33 @@
+package com.zhongzheng.modules.course.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 课程节适用业务关系添加对象 course_section_business
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Data
+@ApiModel("课程节适用业务关系添加对象")
+public class CourseSectionBusinessAddBo {
+
+    /** 节id */
+    @ApiModelProperty("节id")
+    private Long sectionId;
+    /** 教育类型id */
+    @ApiModelProperty("教育类型id")
+    private Long educationTypeId;
+    /** 业务层次id */
+    @ApiModelProperty("业务层次id")
+    private Long businessId;
+    /** 科目id */
+    @ApiModelProperty("科目id")
+    private Long subjectId;
+}

+ 41 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionBusinessEditBo.java

@@ -0,0 +1,41 @@
+package com.zhongzheng.modules.course.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+
+/**
+ * 课程节适用业务关系编辑对象 course_section_business
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Data
+@ApiModel("课程节适用业务关系编辑对象")
+public class CourseSectionBusinessEditBo {
+
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private Long id;
+
+    /** 节id */
+    @ApiModelProperty("节id")
+    private Long sectionId;
+
+    /** 教育类型id */
+    @ApiModelProperty("教育类型id")
+    private Long educationTypeId;
+
+    /** 业务层次id */
+    @ApiModelProperty("业务层次id")
+    private Long businessId;
+
+    /** 科目id */
+    @ApiModelProperty("科目id")
+    private Long subjectId;
+
+
+}

+ 51 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionBusinessQueryBo.java

@@ -0,0 +1,51 @@
+package com.zhongzheng.modules.course.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.zhongzheng.common.core.domain.BaseEntity;
+
+/**
+ * 课程节适用业务关系分页查询对象 course_section_business
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("课程节适用业务关系分页查询对象")
+public class CourseSectionBusinessQueryBo extends BaseEntity {
+
+	/** 分页大小 */
+	@ApiModelProperty("分页大小")
+	private Integer pageSize;
+	/** 当前页数 */
+	@ApiModelProperty("当前页数")
+	private Integer pageNum;
+	/** 排序列 */
+	@ApiModelProperty("排序列")
+	private String orderByColumn;
+	/** 排序的方向desc或者asc */
+	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
+	private String isAsc;
+
+
+	/** 节id */
+	@ApiModelProperty("节id")
+	private Long sectionId;
+	/** 教育类型id */
+	@ApiModelProperty("教育类型id")
+	private Long educationTypeId;
+	/** 业务层次id */
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
+	/** 科目id */
+	@ApiModelProperty("科目id")
+	private Long subjectId;
+}

+ 42 - 23
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionEditBo.java

@@ -4,9 +4,6 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotBlank;
 import java.util.Date;
 
 
@@ -14,45 +11,67 @@ import java.util.Date;
  * 课程小节编辑对象 course_section
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 @Data
 @ApiModel("课程小节编辑对象")
 public class CourseSectionEditBo {
 
-
     /** 节ID */
     @ApiModelProperty("节ID")
     private Long sectionId;
 
-    /** 大章ID */
-    @ApiModelProperty("大章ID")
-    @Min(value = 1, message = "大章ID不能为空")
-    private Long chapterId;
-
     /** 名称 */
     @ApiModelProperty("名称")
-    @NotBlank(message = "小节名称不能为空")
     private String name;
 
-    /** 视频地址 */
-    @ApiModelProperty("视频地址")
-    private String videoUrl;
-
-    /** 时长(秒数) */
-    @ApiModelProperty("时长(秒数)")
-    private Long videoTime;
+    /** 排序 */
+    @ApiModelProperty("排序")
+    private Long sort;
 
     /** 修改时间 */
     @ApiModelProperty("修改时间")
     private Long updateTime;
 
+
+    /** 前缀名称 */
+    @ApiModelProperty("前缀名称")
+    private String prefixName;
+
     /** 状态 1正常 0关闭 */
     @ApiModelProperty("状态 1正常 0关闭")
     private Integer status;
-    @ApiModelProperty("排序")
-    private Long sort;
-    @ApiModelProperty("保利威视频ID")
-    @NotBlank(message = "保利威视频ID不能为空")
-    private String vid;
+
+    /** 节类型 1录播 2直播 3回放 */
+    @ApiModelProperty("节类型 1录播 2直播 3回放")
+    private Integer sectionType;
+
+    /** 发布状态 1发布 0未发布 */
+    @ApiModelProperty("发布状态 1发布 0未发布")
+    private Integer publishStatus;
+
+    /** 直播流地址 */
+    @ApiModelProperty("直播流地址")
+    private String liveUrl;
+
+    /** 直播开始时间 */
+    @ApiModelProperty("直播开始时间")
+    private Long liveStartTime;
+
+    /** 直播结束时间 */
+    @ApiModelProperty("直播结束时间")
+    private Long liveEndTime;
+
+    /** 直播节时长(分钟) */
+    @ApiModelProperty("直播节时长(分钟)")
+    private Long liveDuration;
+
+    /** 录播和回放的url地址 */
+    @ApiModelProperty("录播和回放的url地址")
+    private String recordingUrl;
+
+    /** 录播和回放节时长(分钟) */
+    @ApiModelProperty("录播和回放节时长(分钟)")
+    private Long recordingDuration;
+
 }

+ 32 - 13
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CourseSectionQueryBo.java

@@ -6,7 +6,6 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 import java.util.Date;
-import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
 
@@ -16,7 +15,7 @@ import com.zhongzheng.common.core.domain.BaseEntity;
  * 课程小节分页查询对象 course_section
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -37,20 +36,40 @@ public class CourseSectionQueryBo extends BaseEntity {
 	private String isAsc;
 
 
-	/** 大章ID */
-	@ApiModelProperty("大章ID")
-	private Long chapterId;
 	/** 名称 */
 	@ApiModelProperty("名称")
 	private String name;
-	/** 视频地址 */
-	@ApiModelProperty("视频地址")
-	private String videoUrl;
-	/** 时长(秒数) */
-	@ApiModelProperty("时长(秒数)")
-	private Long videoTime;
+	/** 排序 */
+	@ApiModelProperty("排序")
+	private Long sort;
+	/** 前缀名称 */
+	@ApiModelProperty("前缀名称")
+	private String prefixName;
 	/** 状态 1正常 0关闭 */
 	@ApiModelProperty("状态 1正常 0关闭")
-	private List<Integer> status;
-
+	private Integer status;
+	/** 节类型 1录播 2直播 3回放 */
+	@ApiModelProperty("节类型 1录播 2直播 3回放")
+	private Integer sectionType;
+	/** 发布状态 1发布 0未发布 */
+	@ApiModelProperty("发布状态 1发布 0未发布")
+	private Integer publishStatus;
+	/** 直播流地址 */
+	@ApiModelProperty("直播流地址")
+	private String liveUrl;
+	/** 直播开始时间 */
+	@ApiModelProperty("直播开始时间")
+	private Long liveStartTime;
+	/** 直播结束时间 */
+	@ApiModelProperty("直播结束时间")
+	private Long liveEndTime;
+	/** 直播节时长(分钟) */
+	@ApiModelProperty("直播节时长(分钟)")
+	private Long liveDuration;
+	/** 录播和回放的url地址 */
+	@ApiModelProperty("录播和回放的url地址")
+	private String recordingUrl;
+	/** 录播和回放节时长(分钟) */
+	@ApiModelProperty("录播和回放节时长(分钟)")
+	private Long recordingDuration;
 }

+ 21 - 32
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/domain/CourseSection.java

@@ -13,7 +13,7 @@ import com.zhongzheng.common.annotation.Excel;
  * 课程小节对象 course_section
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 @Data
 @NoArgsConstructor
@@ -23,48 +23,37 @@ public class CourseSection implements Serializable {
 
 private static final long serialVersionUID=1L;
 
-
     /** 节ID */
     @TableId(value = "section_id")
     private Long sectionId;
-
-    /** 大章ID */
-    private Long chapterId;
-
     /** 名称 */
     private String name;
-
-    /** 视频地址 */
-    private String videoUrl;
-
-    /** 时长(秒数) */
-    private Long videoTime;
-
+    /** 排序 */
+    private Long sort;
     /** 添加时间 */
     @TableField(fill = FieldFill.INSERT)
     private Long createTime;
-
     /** 修改时间 */
     @TableField(fill = FieldFill.INSERT_UPDATE)
     private Long updateTime;
-
+    /** 前缀名称 */
+    private String prefixName;
     /** 状态 1正常 0关闭 */
     private Integer status;
-
-    /** $column.columnComment */
-    private Long sort;
-
-    /** 本地保利威视频ID */
-    private Long polyvId;
-
-    /** 保利威视频ID */
-    @TableField(exist = false)
-    private String vid;
-    @TableField(exist = false)
-    private String duration;
-    @TableField(exist = false)
-    private String mp4;
-    @TableField(exist = false)
-    private String firstImage;
-
+    /** 节类型 1录播 2直播 3回放 */
+    private Integer sectionType;
+    /** 发布状态 1发布 0未发布 */
+    private Integer publishStatus;
+    /** 直播流地址 */
+    private String liveUrl;
+    /** 直播开始时间 */
+    private Long liveStartTime;
+    /** 直播结束时间 */
+    private Long liveEndTime;
+    /** 直播节时长(分钟) */
+    private Long liveDuration;
+    /** 录播和回放的url地址 */
+    private String recordingUrl;
+    /** 录播和回放节时长(分钟) */
+    private Long recordingDuration;
 }

+ 37 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/domain/CourseSectionBusiness.java

@@ -0,0 +1,37 @@
+package com.zhongzheng.modules.course.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.zhongzheng.common.annotation.Excel;
+
+/**
+ * 课程节适用业务关系对象 course_section_business
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("course_section_business")
+public class CourseSectionBusiness implements Serializable {
+
+private static final long serialVersionUID=1L;
+
+    /** $column.columnComment */
+    @TableId(value = "id")
+    private Long id;
+    /** 节id */
+    private Long sectionId;
+    /** 教育类型id */
+    private Long educationTypeId;
+    /** 业务层次id */
+    private Long businessId;
+    /** 科目id */
+    private Long subjectId;
+}

+ 14 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseSectionBusinessMapper.java

@@ -0,0 +1,14 @@
+package com.zhongzheng.modules.course.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
+
+/**
+ * 课程节适用业务关系Mapper接口
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+public interface CourseSectionBusinessMapper extends BaseMapper<CourseSectionBusiness> {
+
+}

+ 1 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseSectionMapper.java

@@ -1,23 +1,14 @@
 package com.zhongzheng.modules.course.mapper;
 
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.zhongzheng.modules.course.bo.CourseQueryBo;
-import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
 import com.zhongzheng.modules.course.domain.CourseSection;
-import com.zhongzheng.modules.course.vo.CourseSectionVo;
-import com.zhongzheng.modules.course.vo.CourseVo;
-
-import java.util.List;
 
 /**
  * 课程小节Mapper接口
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 public interface CourseSectionMapper extends BaseMapper<CourseSection> {
 
-    List<CourseSectionVo> selectCourseSectionList(CourseSectionQueryBo bo);
-
 }

+ 52 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseSectionBusinessService.java

@@ -0,0 +1,52 @@
+package com.zhongzheng.modules.course.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessAddBo;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessEditBo;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessQueryBo;
+import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
+import com.zhongzheng.modules.course.vo.CourseSectionBusinessVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 课程节适用业务关系Service接口
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+public interface ICourseSectionBusinessService extends IService<CourseSectionBusiness> {
+	/**
+	 * 查询单个
+	 * @return
+	 */
+	CourseSectionBusinessVo queryById(Long id);
+
+	/**
+	 * 查询列表
+	 */
+	List<CourseSectionBusinessVo> queryList(CourseSectionBusinessQueryBo bo);
+
+	/**
+	 * 根据新增业务对象插入课程节适用业务关系
+	 * @param bo 课程节适用业务关系新增业务对象
+	 * @return
+	 */
+	Boolean insertByAddBo(CourseSectionBusinessAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改课程节适用业务关系
+	 * @param bo 课程节适用业务关系编辑业务对象
+	 * @return
+	 */
+	Boolean updateByEditBo(CourseSectionBusinessEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param ids 主键集合
+	 * @param isValid 是否校验,true-删除前校验,false-不校验
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 1 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseSectionService.java

@@ -15,7 +15,7 @@ import java.util.List;
  * 课程小节Service接口
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 public interface ICourseSectionService extends IService<CourseSection> {
 	/**
@@ -29,8 +29,6 @@ public interface ICourseSectionService extends IService<CourseSection> {
 	 */
 	List<CourseSectionVo> queryList(CourseSectionQueryBo bo);
 
-	List<CourseSectionVo> selectList(CourseSectionQueryBo bo);
-
 	/**
 	 * 根据新增业务对象插入课程小节
 	 * @param bo 课程小节新增业务对象

+ 99 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionBusinessServiceImpl.java

@@ -0,0 +1,99 @@
+package com.zhongzheng.modules.course.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessAddBo;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessEditBo;
+import com.zhongzheng.modules.course.bo.CourseSectionBusinessQueryBo;
+import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
+import com.zhongzheng.modules.course.mapper.CourseSectionBusinessMapper;
+import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
+import com.zhongzheng.modules.course.vo.CourseSectionBusinessVo;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 课程节适用业务关系Service业务层处理
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Service
+public class CourseSectionBusinessServiceImpl extends ServiceImpl<CourseSectionBusinessMapper, CourseSectionBusiness> implements ICourseSectionBusinessService {
+
+    @Override
+    public CourseSectionBusinessVo queryById(Long id){
+        CourseSectionBusiness db = this.baseMapper.selectById(id);
+        return BeanUtil.toBean(db, CourseSectionBusinessVo.class);
+    }
+
+    @Override
+    public List<CourseSectionBusinessVo> queryList(CourseSectionBusinessQueryBo bo) {
+        LambdaQueryWrapper<CourseSectionBusiness> lqw = Wrappers.lambdaQuery();
+        lqw.eq(bo.getSectionId() != null, CourseSectionBusiness::getSectionId, bo.getSectionId());
+        lqw.eq(bo.getEducationTypeId() != null, CourseSectionBusiness::getEducationTypeId, bo.getEducationTypeId());
+        lqw.eq(bo.getBusinessId() != null, CourseSectionBusiness::getBusinessId, bo.getBusinessId());
+        lqw.eq(bo.getSubjectId() != null, CourseSectionBusiness::getSubjectId, bo.getSubjectId());
+        return entity2Vo(this.list(lqw));
+    }
+
+    /**
+    * 实体类转化成视图对象
+    *
+    * @param collection 实体类集合
+    * @return
+    */
+    private List<CourseSectionBusinessVo> entity2Vo(Collection<CourseSectionBusiness> collection) {
+        List<CourseSectionBusinessVo> voList = collection.stream()
+                .map(any -> BeanUtil.toBean(any, CourseSectionBusinessVo.class))
+                .collect(Collectors.toList());
+        if (collection instanceof Page) {
+            Page<CourseSectionBusiness> page = (Page<CourseSectionBusiness>)collection;
+            Page<CourseSectionBusinessVo> pageVo = new Page<>();
+            BeanUtil.copyProperties(page,pageVo);
+            pageVo.addAll(voList);
+            voList = pageVo;
+        }
+        return voList;
+    }
+
+    @Override
+    public Boolean insertByAddBo(CourseSectionBusinessAddBo bo) {
+        CourseSectionBusiness add = BeanUtil.toBean(bo, CourseSectionBusiness.class);
+        validEntityBeforeSave(add);
+        return this.save(add);
+    }
+
+    @Override
+    public Boolean updateByEditBo(CourseSectionBusinessEditBo bo) {
+        CourseSectionBusiness update = BeanUtil.toBean(bo, CourseSectionBusiness.class);
+        validEntityBeforeSave(update);
+        return this.updateById(update);
+    }
+
+    /**
+     * 保存前的数据校验
+     *
+     * @param entity 实体类数据
+     */
+    private void validEntityBeforeSave(CourseSectionBusiness entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return this.removeByIds(ids);
+    }
+}

+ 13 - 36
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionServiceImpl.java

@@ -2,20 +2,14 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.bo.CourseSectionAddBo;
 import com.zhongzheng.modules.course.bo.CourseSectionEditBo;
 import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
 import com.zhongzheng.modules.course.domain.CourseSection;
-import com.zhongzheng.modules.course.mapper.CourseMapper;
 import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
 import com.zhongzheng.modules.course.service.ICourseSectionService;
 import com.zhongzheng.modules.course.vo.CourseSectionVo;
-import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
-import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -31,17 +25,11 @@ import java.util.stream.Collectors;
  * 课程小节Service业务层处理
  *
  * @author hjl
- * @date 2021-05-19
+ * @date 2021-10-11
  */
 @Service
 public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, CourseSection> implements ICourseSectionService {
 
-    @Autowired
-    private IPolyvVideoService iPolyvVideoService;
-
-    @Autowired
-    private CourseSectionMapper courseSectionMapper;
-
     @Override
     public CourseSectionVo queryById(Long sectionId){
         CourseSection db = this.baseMapper.selectById(sectionId);
@@ -51,19 +39,21 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
     @Override
     public List<CourseSectionVo> queryList(CourseSectionQueryBo bo) {
         LambdaQueryWrapper<CourseSection> lqw = Wrappers.lambdaQuery();
-        lqw.eq(bo.getChapterId() != null, CourseSection::getChapterId, bo.getChapterId());
         lqw.like(StrUtil.isNotBlank(bo.getName()), CourseSection::getName, bo.getName());
-        lqw.eq(StrUtil.isNotBlank(bo.getVideoUrl()), CourseSection::getVideoUrl, bo.getVideoUrl());
-        lqw.eq(bo.getVideoTime() != null, CourseSection::getVideoTime, bo.getVideoTime());
-        lqw.in(bo.getStatus() != null, CourseSection::getStatus, bo.getStatus());
+        lqw.eq(bo.getSort() != null, CourseSection::getSort, bo.getSort());
+        lqw.like(StrUtil.isNotBlank(bo.getPrefixName()), CourseSection::getPrefixName, bo.getPrefixName());
+        lqw.eq(bo.getStatus() != null, CourseSection::getStatus, bo.getStatus());
+        lqw.eq(bo.getSectionType() != null, CourseSection::getSectionType, bo.getSectionType());
+        lqw.eq(bo.getPublishStatus() != null, CourseSection::getPublishStatus, bo.getPublishStatus());
+        lqw.eq(StrUtil.isNotBlank(bo.getLiveUrl()), CourseSection::getLiveUrl, bo.getLiveUrl());
+        lqw.eq(bo.getLiveStartTime() != null, CourseSection::getLiveStartTime, bo.getLiveStartTime());
+        lqw.eq(bo.getLiveEndTime() != null, CourseSection::getLiveEndTime, bo.getLiveEndTime());
+        lqw.eq(bo.getLiveDuration() != null, CourseSection::getLiveDuration, bo.getLiveDuration());
+        lqw.eq(StrUtil.isNotBlank(bo.getRecordingUrl()), CourseSection::getRecordingUrl, bo.getRecordingUrl());
+        lqw.eq(bo.getRecordingDuration() != null, CourseSection::getRecordingDuration, bo.getRecordingDuration());
         return entity2Vo(this.list(lqw));
     }
 
-    @Override
-    public List<CourseSectionVo> selectList(CourseSectionQueryBo bo) {
-        return courseSectionMapper.selectCourseSectionList(bo);
-    }
-
     /**
     * 实体类转化成视图对象
     *
@@ -106,21 +96,8 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
      *
      * @param entity 实体类数据
      */
-    private void validEntityBeforeSave(CourseSection entity) {
+    private void validEntityBeforeSave(CourseSection entity){
         //TODO 做一些数据校验,如唯一约束
-        if(StringUtils.isNotBlank(entity.getVid())){
-            try{
-                PolyvVideoQuerVo polyvVideo = iPolyvVideoService.queryById(entity.getVid());
-                if(polyvVideo == null){
-                    throw new CustomException("保利威视频不存在");
-                }
-                entity.setPolyvId(polyvVideo.getPolyvId());
-            }catch (Exception e){
-                throw new CustomException("保利威视频错误");
-            }
-
-        }
-
     }
 
     @Override

+ 43 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/CourseSectionBusinessVo.java

@@ -0,0 +1,43 @@
+package com.zhongzheng.modules.course.vo;
+
+import com.zhongzheng.common.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 课程节适用业务关系视图对象 mall_package
+ *
+ * @author hjl
+ * @date 2021-10-11
+ */
+@Data
+@ApiModel("课程节适用业务关系视图对象")
+public class CourseSectionBusinessVo {
+	private static final long serialVersionUID = 1L;
+
+	/** $pkColumn.columnComment */
+	@ApiModelProperty("$pkColumn.columnComment")
+	private Long id;
+
+	/** 节id */
+	@Excel(name = "节id")
+	@ApiModelProperty("节id")
+	private Long sectionId;
+	/** 教育类型id */
+	@Excel(name = "教育类型id")
+	@ApiModelProperty("教育类型id")
+	private Long educationTypeId;
+	/** 业务层次id */
+	@Excel(name = "业务层次id")
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
+	/** 科目id */
+	@Excel(name = "科目id")
+	@ApiModelProperty("科目id")
+	private Long subjectId;
+}

+ 42 - 28
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/CourseSectionVo.java

@@ -1,6 +1,5 @@
 package com.zhongzheng.modules.course.vo;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -13,8 +12,8 @@ import java.util.Date;
 /**
  * 课程小节视图对象 mall_package
  *
- * @author ruoyi
- * @date 2021-05-19
+ * @author hjl
+ * @date 2021-10-11
  */
 @Data
 @ApiModel("课程小节视图对象")
@@ -25,37 +24,52 @@ public class CourseSectionVo {
 	@ApiModelProperty("节ID")
 	private Long sectionId;
 
-	/** 大章ID */
-	@Excel(name = "大章ID")
-	@ApiModelProperty("大章ID")
-	private Long chapterId;
 	/** 名称 */
 	@Excel(name = "名称")
 	@ApiModelProperty("名称")
 	private String name;
-	/** 视频地址 */
-	@Excel(name = "视频地址")
-	@ApiModelProperty("视频地址")
-	private String videoUrl;
-	/** 时长(秒数) */
-	@Excel(name = "时长(秒数)")
-	@ApiModelProperty("时长(秒数)")
-	private Long videoTime;
+	/** 排序 */
+	@Excel(name = "排序")
+	@ApiModelProperty("排序")
+	private Long sort;
+	/** 前缀名称 */
+	@Excel(name = "前缀名称")
+	@ApiModelProperty("前缀名称")
+	private String prefixName;
 	/** 状态 1正常 0关闭 */
 	@Excel(name = "状态 1正常 0关闭")
 	@ApiModelProperty("状态 1正常 0关闭")
 	private Integer status;
-	/** $column.columnComment */
-	@Excel(name = "排序")
-	@ApiModelProperty("排序")
-	private Long sort;
-	@ApiModelProperty("时长")
-	private String duration;
-	@ApiModelProperty("mp4 地址")
-	private String mp4;
-	@ApiModelProperty("预览图")
-	private String firstImage;
-	@ApiModelProperty("保利威VID")
-	private String vid;
-
+	/** 节类型 1录播 2直播 3回放 */
+	@Excel(name = "节类型 1录播 2直播 3回放")
+	@ApiModelProperty("节类型 1录播 2直播 3回放")
+	private Integer sectionType;
+	/** 发布状态 1发布 0未发布 */
+	@Excel(name = "发布状态 1发布 0未发布")
+	@ApiModelProperty("发布状态 1发布 0未发布")
+	private Integer publishStatus;
+	/** 直播流地址 */
+	@Excel(name = "直播流地址")
+	@ApiModelProperty("直播流地址")
+	private String liveUrl;
+	/** 直播开始时间 */
+	@Excel(name = "直播开始时间")
+	@ApiModelProperty("直播开始时间")
+	private Long liveStartTime;
+	/** 直播结束时间 */
+	@Excel(name = "直播结束时间")
+	@ApiModelProperty("直播结束时间")
+	private Long liveEndTime;
+	/** 直播节时长(分钟) */
+	@Excel(name = "直播节时长(分钟)")
+	@ApiModelProperty("直播节时长(分钟)")
+	private Long liveDuration;
+	/** 录播和回放的url地址 */
+	@Excel(name = "录播和回放的url地址")
+	@ApiModelProperty("录播和回放的url地址")
+	private String recordingUrl;
+	/** 录播和回放节时长(分钟) */
+	@Excel(name = "录播和回放节时长(分钟)")
+	@ApiModelProperty("录播和回放节时长(分钟)")
+	private Long recordingDuration;
 }

+ 16 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseSectionBusinessMapper.xml

@@ -0,0 +1,16 @@
+<?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.zhongzheng.modules.course.mapper.CourseSectionBusinessMapper">
+
+    <resultMap type="com.zhongzheng.modules.course.domain.CourseSectionBusiness" id="CourseSectionBusinessResult">
+        <result property="id" column="id"/>
+        <result property="sectionId" column="section_id"/>
+        <result property="educationTypeId" column="education_type_id"/>
+        <result property="businessId" column="business_id"/>
+        <result property="subjectId" column="subject_id"/>
+    </resultMap>
+
+
+</mapper>

+ 11 - 36
zhongzheng-system/src/main/resources/mapper/modules/course/CourseSectionMapper.xml

@@ -6,46 +6,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="com.zhongzheng.modules.course.domain.CourseSection" id="CourseSectionResult">
         <result property="sectionId" column="section_id"/>
-        <result property="chapterId" column="chapter_id"/>
         <result property="name" column="name"/>
-        <result property="videoUrl" column="video_url"/>
-        <result property="videoTime" column="video_time"/>
+        <result property="sort" column="sort"/>
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
+        <result property="prefixName" column="prefix_name"/>
         <result property="status" column="status"/>
-        <result property="sort" column="sort"/>
-        <result property="polyvId" column="polyv_id"/>
-        <result property="duration" column="duration"/>
-        <result property="mp4" column="mp4"/>
-        <result property="firstImage" column="first_image"/>
-        <result property="vid" column="vid"/>
+        <result property="sectionType" column="section_type"/>
+        <result property="publishStatus" column="publish_status"/>
+        <result property="liveUrl" column="live_url"/>
+        <result property="liveStartTime" column="live_start_time"/>
+        <result property="liveEndTime" column="live_end_time"/>
+        <result property="liveDuration" column="live_duration"/>
+        <result property="recordingUrl" column="recording_url"/>
+        <result property="recordingDuration" column="recording_duration"/>
     </resultMap>
 
-    <select id="selectCourseSectionList" parameterType="com.zhongzheng.modules.course.bo.CourseSectionQueryBo"  resultMap="CourseSectionResult">
-        SELECT
-        cs.section_id,
-        cs.name,
-        cs.chapter_id,
-        cs.`status`,
-        pv.duration,
-        pv.first_image,
-        pv.mp4,
-        pv.vid
-        FROM
-        course_section cs
-        LEFT JOIN polyv_video pv ON cs.polyv_id = pv.polyv_id
-        WHERE 1=1
-        <if test="status != null and status.size()!=0 ">
-            AND cs.status in
-            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </if>
-        <if test="name != null and name != ''">
-            AND cs.name like concat('%', #{bankName}, '%')
-        </if>
-        <if test="chapterId != null and chapterId != ''">
-            AND cs.chapter_id = #{chapterId}
-        </if>
-    </select>
+
 </mapper>