课程学习记录加了teacher_user_id的字段

master
wenyu441069198 3 months ago
parent 2c6cea9aa3
commit 9701771c45
  1. 3
      src/main/java/com/teaching/backend/model/entity/cms/CmsEssay.java
  2. 4
      src/main/java/com/teaching/backend/model/entity/courses/CourseLearningNumber.java
  3. 4
      src/main/java/com/teaching/backend/model/entity/records/CourseLearningRecord.java
  4. 1
      src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java

@ -49,9 +49,6 @@ public class CmsEssay implements Serializable {
@ApiModelProperty(value = "浏览次数")
private Integer readingNumber;
@ApiModelProperty(value = "评论条数")
private Integer commentCount;
@ApiModelProperty(value = "所属栏目id")
private Integer categoryId;

@ -36,6 +36,10 @@ public class CourseLearningNumber implements Serializable {
@TableField("course_id")
private String courseId;
@ApiModelProperty(value = "老师用户id")
@TableField("teacher_user_id")
private String teacherUserId;
@ApiModelProperty(value = "课程学习人数")
@TableField("number")
private Integer number;

@ -54,6 +54,10 @@ public class CourseLearningRecord implements Serializable {
@TableField("img")
private String img;
@ApiModelProperty(value = "老师用户id")
@TableField("teacher_user_id")
private String teacherUserId;
@ApiModelProperty(value = "最近学习时间")
@TableField("times")
private LocalDateTime times;

@ -74,6 +74,7 @@ public class CourseLearningRecordServiceImpl extends ServiceImpl<CourseLearningR
CourseLearningNumber courseLearningNumber = new CourseLearningNumber();
courseLearningNumber.setNumber(1);
courseLearningNumber.setCourseId(courseId);
courseLearningNumber.setTeacherUserId(courseLearningRecord.getTeacherUserId());
courseLearningNumberService.save(courseLearningNumber);
//System.out.println("该课程第一次被学习");
}

Loading…
Cancel
Save