serv-学习管理

This commit is contained in:
2025-10-21 16:21:19 +08:00
parent f72a5cec61
commit 9824a7d686
27 changed files with 1192 additions and 336 deletions

View File

@@ -12,12 +12,19 @@ import org.xyzh.common.dto.BaseDTO;
public class TbCourseChapter extends BaseDTO {
private static final long serialVersionUID = 1L;
private String chapterID;
/**
* @description 课程ID
*/
private String courseID;
/**
* @description 父章节ID
*/
private String parentID;
/**
* @description 章节名称
*/
@@ -32,7 +39,17 @@ public class TbCourseChapter extends BaseDTO {
* @description 视频URL
*/
private String videoUrl;
/**
* @description 章节类型1视频 2文档 3音频
*/
private Integer chapterType;
/**
* @description 资源ID
*/
private String resourceID;
/**
* @description 章节时长(分钟)
*/
@@ -53,6 +70,14 @@ public class TbCourseChapter extends BaseDTO {
*/
private String updater;
public String getChapterID() {
return chapterID;
}
public void setChapterID(String chapterID) {
this.chapterID = chapterID;
}
public String getCourseID() {
return courseID;
}
@@ -61,6 +86,14 @@ public class TbCourseChapter extends BaseDTO {
this.courseID = courseID;
}
public String getParentID() {
return parentID;
}
public void setParentID(String parentID) {
this.parentID = parentID;
}
public String getName() {
return name;
}
@@ -85,6 +118,22 @@ public class TbCourseChapter extends BaseDTO {
this.videoUrl = videoUrl;
}
public Integer getChapterType() {
return chapterType;
}
public void setChapterType(Integer chapterType) {
this.chapterType = chapterType;
}
public String getResourceID() {
return resourceID;
}
public void setResourceID(String resourceID) {
this.resourceID = resourceID;
}
public Integer getDuration() {
return duration;
}
@@ -121,9 +170,14 @@ public class TbCourseChapter extends BaseDTO {
public String toString() {
return "TbCourseChapter{" +
"id=" + getID() +
", chapterID='" + chapterID + '\'' +
", courseID='" + courseID + '\'' +
", parentID='" + parentID + '\'' +
", name='" + name + '\'' +
", content='" + content + '\'' +
", videoUrl='" + videoUrl + '\'' +
", chapterType=" + chapterType +
", resourceID='" + resourceID + '\'' +
", duration=" + duration +
", orderNum=" + orderNum +
'}';

View File

@@ -0,0 +1,186 @@
package org.xyzh.common.dto.study;
import org.xyzh.common.dto.BaseDTO;
/**
* @description 学习节点表
* @filename TbCourseNode.java
* @author yslg
* @copyright xyzh
* @since 2025-10-21
*/
public class TbCourseNode extends BaseDTO {
private static final long serialVersionUID = 1L;
private String nodeID;
/**
* @description 章节ID
*/
private String chapterID;
/**
* @description 节点名称
*/
private String name;
/**
* @description 节点内容
*/
private String content;
/**
* @description 节点类型1视频 2文档 3音频 4图片 5链接
*/
private Integer nodeType;
/**
* @description 资源ID
*/
private String resourceID;
/**
* @description 视频URL
*/
private String videoUrl;
/**
* @description 节点时长(分钟)
*/
private Integer duration;
/**
* @description 排序号
*/
private Integer orderNum;
/**
* @description 是否必修1必修 0选修
*/
private Integer isRequired;
/**
* @description 创建者
*/
private String creator;
/**
* @description 更新者
*/
private String updater;
public String getNodeID() {
return nodeID;
}
public void setNodeID(String nodeID) {
this.nodeID = nodeID;
}
public String getChapterID() {
return chapterID;
}
public void setChapterID(String chapterID) {
this.chapterID = chapterID;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Integer getNodeType() {
return nodeType;
}
public void setNodeType(Integer nodeType) {
this.nodeType = nodeType;
}
public String getResourceID() {
return resourceID;
}
public void setResourceID(String resourceID) {
this.resourceID = resourceID;
}
public String getVideoUrl() {
return videoUrl;
}
public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl;
}
public Integer getDuration() {
return duration;
}
public void setDuration(Integer duration) {
this.duration = duration;
}
public Integer getOrderNum() {
return orderNum;
}
public void setOrderNum(Integer orderNum) {
this.orderNum = orderNum;
}
public Integer getIsRequired() {
return isRequired;
}
public void setIsRequired(Integer isRequired) {
this.isRequired = isRequired;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater;
}
@Override
public String toString() {
return "TbCourseNode{" +
"id=" + getID() +
", nodeID='" + nodeID + '\'' +
", chapterID='" + chapterID + '\'' +
", name='" + name + '\'' +
", content='" + content + '\'' +
", nodeType=" + nodeType +
", resourceID='" + resourceID + '\'' +
", videoUrl='" + videoUrl + '\'' +
", duration=" + duration +
", orderNum=" + orderNum +
", isRequired=" + isRequired +
'}';
}
}

View File

@@ -28,6 +28,11 @@ public class TbUserCollection extends BaseDTO {
*/
private String collectionID;
/**
* @description 收藏值
*/
private Integer collectionValue;
public String getUserID() {
return userID;
}
@@ -52,6 +57,14 @@ public class TbUserCollection extends BaseDTO {
this.collectionID = collectionID;
}
public Integer getCollectionValue() {
return collectionValue;
}
public void setCollectionValue(Integer collectionValue) {
this.collectionValue = collectionValue;
}
@Override
public String toString() {
return "TbUserCollection{" +
@@ -60,6 +73,7 @@ public class TbUserCollection extends BaseDTO {
", collectionType=" + collectionType +
", collectionID='" + collectionID + '\'' +
", createTime=" + getCreateTime() +
", collectionValue=" + collectionValue +
'}';
}
}

View File

@@ -0,0 +1,35 @@
package org.xyzh.common.vo;
import org.xyzh.common.dto.BaseDTO;
import org.xyzh.common.dto.study.TbCourseNode;
import org.xyzh.common.dto.study.TbCourseChapter;
import java.util.ArrayList;
import java.util.List;
public class ChapterVO extends BaseDTO{
private static final long serialVersionUID = 1L;
private TbCourseChapter chapter;
private List<TbCourseNode> nodes;
public TbCourseChapter getChapter() {
return chapter;
}
public void setChapter(TbCourseChapter chapter) {
this.chapter = chapter;
}
public List<TbCourseNode> getNodes() {
return nodes;
}
public void setNodes(List<TbCourseNode> nodes) {
this.nodes = nodes;
}
public void addNode(TbCourseNode node) {
if (nodes == null) {
nodes = new ArrayList<>();
}
nodes.add(node);
}
}

View File

@@ -0,0 +1,39 @@
package org.xyzh.common.vo;
import org.xyzh.common.dto.BaseDTO;
import org.xyzh.common.dto.study.TbCourse;
import org.xyzh.common.dto.study.TbCourseTag;
import org.xyzh.common.vo.ChapterVO;
import java.util.List;
public class CourseVO extends BaseDTO{
private static final long serialVersionUID = 1L;
private TbCourse course;
private List<ChapterVO> courseChapters;
private List<TbCourseTag> courseTags;
public TbCourse getCourse() {
return course;
}
public void setCourse(TbCourse course) {
this.course = course;
}
public List<ChapterVO> getCourseChapters() {
return courseChapters;
}
public void setCourseChapters(List<ChapterVO> courseChapters) {
this.courseChapters = courseChapters;
}
public List<TbCourseTag> getCourseTags() {
return courseTags;
}
public void setCourseTags(List<TbCourseTag> courseTags) {
this.courseTags = courseTags;
}
}