diff --git a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java index 1bc19ce..d40edef 100644 --- a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java +++ b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java @@ -44,6 +44,7 @@ public class CoursesController { @GetMapping("/index") public BaseResponse> getData(@RequestParam("page") int page, @RequestParam("pageSize") int pageSize) { List coursesVo = coursesService.getPagePageSize(page, pageSize); +// System.out.println(coursesVo); long totalcount = coursesService.count(); long toatlPages = (int) Math.ceil((double)totalcount / pageSize); Map objectMap = new HashMap<>(); diff --git a/src/main/java/com/teaching/backend/entity/Chapter.java b/src/main/java/com/teaching/backend/entity/Chapter.java new file mode 100644 index 0000000..7f74db7 --- /dev/null +++ b/src/main/java/com/teaching/backend/entity/Chapter.java @@ -0,0 +1,117 @@ +package com.teaching.backend.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * + *

+ * + * @author author + * @since 2024-06-07 + */ +@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/resources/mapper/ChapterMapper.xml b/src/main/resources/mapper/ChapterMapper.xml new file mode 100644 index 0000000..2cf1942 --- /dev/null +++ b/src/main/resources/mapper/ChapterMapper.xml @@ -0,0 +1,5 @@ + + + + +