master
叮叮咚咚 6 months ago
parent 00b19991c5
commit b1a7b4ca6e
  1. 28
      src/main/java/com/teaching/backend/controller/chapter/ChapterController.java
  2. 17
      src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.java
  3. 5
      src/main/java/com/teaching/backend/mapper/chapter/ChapterMapper.xml
  4. 118
      src/main/java/com/teaching/backend/model/entity/chapter/Chapter.java
  5. 13
      src/main/java/com/teaching/backend/service/chapter/IChapterService.java
  6. 17
      src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.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;
}

@ -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;
/**
* <p>
* Mapper 接口
* </p>
*
* @author author
* @since 2024-05-31
*/
public interface ChapterMapper extends BaseMapper<Chapter> {
}

@ -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>

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

@ -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<Chapter> {
}

@ -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<ChapterMapper, Chapter> implements IChapterService {
}
Loading…
Cancel
Save