网站首页——触底加载1.1

master
叮叮咚咚 5 months ago
parent 3cd3cb9a45
commit efe9855a5d
  1. 1
      src/main/java/com/teaching/backend/controller/courses/CoursesController.java
  2. 117
      src/main/java/com/teaching/backend/entity/Chapter.java
  3. 5
      src/main/resources/mapper/ChapterMapper.xml

@ -44,6 +44,7 @@ public class CoursesController {
@GetMapping("/index") @GetMapping("/index")
public BaseResponse<Map<String,Object>> getData(@RequestParam("page") int page, @RequestParam("pageSize") int pageSize) { public BaseResponse<Map<String,Object>> getData(@RequestParam("page") int page, @RequestParam("pageSize") int pageSize) {
List<CoursesVO> coursesVo = coursesService.getPagePageSize(page, pageSize); List<CoursesVO> coursesVo = coursesService.getPagePageSize(page, pageSize);
// System.out.println(coursesVo);
long totalcount = coursesService.count(); long totalcount = coursesService.count();
long toatlPages = (int) Math.ceil((double)totalcount / pageSize); long toatlPages = (int) Math.ceil((double)totalcount / pageSize);
Map<String,Object> objectMap = new HashMap<>(); Map<String,Object> objectMap = new HashMap<>();

@ -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;
/**
* <p>
*
* </p>
*
* @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;
}

@ -0,0 +1,5 @@
<?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.teaching.backend.mapper.ChapterMapper">
</mapper>
Loading…
Cancel
Save