From b1a7b4ca6ee09f0daf89fcc760098f9a6c1f2a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AE=E5=8F=AE=E5=92=9A=E5=92=9A?= <3107655287@qq.com> Date: Fri, 7 Jun 2024 18:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/chapter/ChapterController.java | 28 +++++ .../backend/mapper/chapter/ChapterMapper.java | 17 +++ .../backend/mapper/chapter/ChapterMapper.xml | 5 + .../backend/model/entity/chapter/Chapter.java | 118 ++++++++++++++++++ .../service/chapter/IChapterService.java | 13 ++ .../impl/chapter/ChapterServiceImpl.java | 17 +++ 6 files changed, 198 insertions(+) create mode 100644 src/main/java/com/teaching/backend/controller/chapter/ChapterController.java create mode 100644 src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.java create mode 100644 src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.xml create mode 100644 src/main/java/com/teaching/backend/model/entity/chapter/Chapter.java create mode 100644 src/main/java/com/teaching/backend/service/chapter/IChapterService.java create mode 100644 src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java diff --git a/src/main/java/com/teaching/backend/controller/chapter/ChapterController.java b/src/main/java/com/teaching/backend/controller/chapter/ChapterController.java new file mode 100644 index 0000000..7fc04f0 --- /dev/null +++ b/src/main/java/com/teaching/backend/controller/chapter/ChapterController.java @@ -0,0 +1,28 @@ +package com.teaching.backend.controller.chapter; + + + +import com.teaching.backend.service.chapter.IChapterService; +import io.swagger.annotations.Api; +import lombok.extern.slf4j.Slf4j; +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 java.util.List; + +/** + * + * @author author + * @since 2024-05-31 + */ +@Slf4j +@Api(tags = "章节管理") +@RestController +@RequestMapping("/chapter") +public class ChapterController { + @Autowired + private IChapterService chapterService; + +} diff --git a/src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.java b/src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.java new file mode 100644 index 0000000..17a366f --- /dev/null +++ b/src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.java @@ -0,0 +1,17 @@ +package com.teaching.backend.mapper.chapter; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.teaching.backend.model.entity.chapter.Chapter; + +/** + *

+ * Mapper 接口 + *

+ * + * @author author + * @since 2024-05-31 + */ +public interface ChapterMapper extends BaseMapper { + +} diff --git a/src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.xml b/src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.xml new file mode 100644 index 0000000..2cf1942 --- /dev/null +++ b/src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/teaching/backend/model/entity/chapter/Chapter.java b/src/main/java/com/teaching/backend/model/entity/chapter/Chapter.java new file mode 100644 index 0000000..0a7cafb --- /dev/null +++ b/src/main/java/com/teaching/backend/model/entity/chapter/Chapter.java @@ -0,0 +1,118 @@ +package com.teaching.backend.model.entity.chapter; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author author + * @since 2024-05-31 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("chapter") +@ApiModel(value="Chapter对象", description="") +public class Chapter implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.AUTO) + private String id; + + @ApiModelProperty(value = "创建人") + @TableField("create_by") + private String createBy; + + @ApiModelProperty(value = "创建日期") + @TableField("create_time") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + @TableField("update_by") + private String updateBy; + + @ApiModelProperty(value = "更新日期") + @TableField("update_time") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "所属部门") + @TableField("sys_org_code") + private String sysOrgCode; + + @ApiModelProperty(value = "序号") + @TableField("num") + private Integer num; + + @ApiModelProperty(value = "名称") + @TableField("name") + private String name; + + @ApiModelProperty(value = "简介") + @TableField("content") + private String content; + + @ApiModelProperty(value = "父级节点") + @TableField("pid") + private String pid; + + @ApiModelProperty(value = "是否有子节点") + @TableField("has_child") + private String hasChild; + + @ApiModelProperty(value = "课程") + @TableField("courseid") + private String courseid; + + @ApiModelProperty(value = "课程目标") + @TableField("courseobjectivesid") + private String courseobjectivesid; + + @ApiModelProperty(value = "总学时") + @TableField("totalclasshours") + private String totalclasshours; + + @ApiModelProperty(value = "要求") + @TableField("requirement") + private String requirement; + + @ApiModelProperty(value = "线上学时") + @TableField("onlinclasshours") + private String onlinclasshours; + + @ApiModelProperty(value = "知识点") + @TableField("knowid") + private String knowid; + + @ApiModelProperty(value = "周次") + @TableField("zc") + private String zc; + + @ApiModelProperty(value = "资源") + @TableField("ziyuan") + private String ziyuan; + + @ApiModelProperty(value = "知识点") + @TableField("know") + private String know; + + @ApiModelProperty(value = "内部序号显示") + @TableField("numshow") + private String numshow; + + +} diff --git a/src/main/java/com/teaching/backend/service/chapter/IChapterService.java b/src/main/java/com/teaching/backend/service/chapter/IChapterService.java new file mode 100644 index 0000000..b68662b --- /dev/null +++ b/src/main/java/com/teaching/backend/service/chapter/IChapterService.java @@ -0,0 +1,13 @@ +package com.teaching.backend.service.chapter; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.teaching.backend.model.entity.chapter.Chapter; + +/** + * + * @author author + * @since 2024-05-31 + */ +public interface IChapterService extends IService { +} diff --git a/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java new file mode 100644 index 0000000..f8935bc --- /dev/null +++ b/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java @@ -0,0 +1,17 @@ +package com.teaching.backend.service.impl.chapter; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.teaching.backend.mapper.chapter.ChapterMapper; +import com.teaching.backend.model.entity.chapter.Chapter; +import com.teaching.backend.service.chapter.IChapterService; +import org.springframework.stereotype.Service; + +/** + * + * @author author + * @since 2024-05-31 + */ +@Service +public class ChapterServiceImpl extends ServiceImpl implements IChapterService { +}