From 84bd4fdb55a3e1bf877291b9cfbb87dd85984688 Mon Sep 17 00:00:00 2001 From: none Date: Mon, 20 Mar 2023 16:45:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E5=91=98=E5=AD=A6=E4=B9=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/frontend/CourseController.java | 6 +- .../api/domain/UserCourseHourRecord.java | 153 ++++++++++++++++++ .../playedu/api/domain/UserCourseRecord.java | 143 ++++++++++++++++ .../api/domain/UserLearnDurationRecord.java | 106 ++++++++++++ .../mapper/UserCourseHourRecordMapper.java | 20 +++ .../api/mapper/UserCourseRecordMapper.java | 20 +++ .../mapper/UserLearnDurationRecordMapper.java | 20 +++ .../service/UserCourseHourRecordService.java | 13 ++ .../api/service/UserCourseRecordService.java | 13 ++ .../UserLearnDurationRecordService.java | 13 ++ .../impl/UserCourseHourRecordServiceImpl.java | 22 +++ .../impl/UserCourseRecordServiceImpl.java | 22 +++ .../UserLearnDurationRecordServiceImpl.java | 22 +++ .../mapper/UserCourseHourRecordMapper.xml | 27 ++++ .../mapper/UserCourseRecordMapper.xml | 26 +++ .../mapper/UserLearnDurationRecordMapper.xml | 20 +++ 16 files changed, 643 insertions(+), 3 deletions(-) create mode 100644 src/main/java/xyz/playedu/api/domain/UserCourseHourRecord.java create mode 100644 src/main/java/xyz/playedu/api/domain/UserCourseRecord.java create mode 100644 src/main/java/xyz/playedu/api/domain/UserLearnDurationRecord.java create mode 100644 src/main/java/xyz/playedu/api/mapper/UserCourseHourRecordMapper.java create mode 100644 src/main/java/xyz/playedu/api/mapper/UserCourseRecordMapper.java create mode 100644 src/main/java/xyz/playedu/api/mapper/UserLearnDurationRecordMapper.java create mode 100644 src/main/java/xyz/playedu/api/service/UserCourseHourRecordService.java create mode 100644 src/main/java/xyz/playedu/api/service/UserCourseRecordService.java create mode 100644 src/main/java/xyz/playedu/api/service/UserLearnDurationRecordService.java create mode 100644 src/main/java/xyz/playedu/api/service/impl/UserCourseHourRecordServiceImpl.java create mode 100644 src/main/java/xyz/playedu/api/service/impl/UserCourseRecordServiceImpl.java create mode 100644 src/main/java/xyz/playedu/api/service/impl/UserLearnDurationRecordServiceImpl.java create mode 100644 src/main/resources/mapper/UserCourseHourRecordMapper.xml create mode 100644 src/main/resources/mapper/UserCourseRecordMapper.xml create mode 100644 src/main/resources/mapper/UserLearnDurationRecordMapper.xml diff --git a/src/main/java/xyz/playedu/api/controller/frontend/CourseController.java b/src/main/java/xyz/playedu/api/controller/frontend/CourseController.java index 54fef9b..407be2a 100644 --- a/src/main/java/xyz/playedu/api/controller/frontend/CourseController.java +++ b/src/main/java/xyz/playedu/api/controller/frontend/CourseController.java @@ -53,9 +53,9 @@ public class CourseController { Course course = courseService.findOrFail(id); HashMap data = new HashMap<>(); - data.put("course", course);//线上课 - data.put("chapters", chapterService.getChaptersByCourseId(course.getId()));//章节 - data.put("hours", hourService.getHoursByCourseId(course.getId()).stream().collect(Collectors.groupingBy(CourseHour::getChapterId)));//课时 + data.put("course", course); + data.put("chapters", chapterService.getChaptersByCourseId(course.getId())); + data.put("hours", hourService.getHoursByCourseId(course.getId()).stream().collect(Collectors.groupingBy(CourseHour::getChapterId))); return JsonResponse.data(data); } diff --git a/src/main/java/xyz/playedu/api/domain/UserCourseHourRecord.java b/src/main/java/xyz/playedu/api/domain/UserCourseHourRecord.java new file mode 100644 index 0000000..d292834 --- /dev/null +++ b/src/main/java/xyz/playedu/api/domain/UserCourseHourRecord.java @@ -0,0 +1,153 @@ +package xyz.playedu.api.domain; + +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 java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * @TableName user_course_hour_records + */ +@TableName(value = "user_course_hour_records") +@Data +public class UserCourseHourRecord implements Serializable { + /** + * + */ + @TableId(type = IdType.AUTO) + private Integer id; + + /** + * + */ + @JsonProperty("user_id") + private Integer userId; + + /** + * + */ + @JsonProperty("course_id") + private Integer courseId; + + /** + * + */ + @JsonProperty("hour_id") + private Integer hourId; + + /** + * 总时长 + */ + @JsonProperty("total_duration") + private Integer totalDuration; + + /** + * 已完成时长 + */ + @JsonProperty("finished_duration") + private Integer finishedDuration; + + /** + * 实际观看时长 + */ + @JsonProperty("real_duration") + private Integer realDuration; + + /** + * 是否看完[1:是,0:否] + */ + @JsonProperty("is_finished") + private Integer isFinished; + + /** + * 看完时间 + */ + @JsonProperty("finished_at") + private Date finishedAt; + + /** + * + */ + @JsonProperty("created_at") + private Date createdAt; + + /** + * + */ + @JsonProperty("updated_at") + private Date updatedAt; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserCourseHourRecord other = (UserCourseHourRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId())) + && (this.getHourId() == null ? other.getHourId() == null : this.getHourId().equals(other.getHourId())) + && (this.getTotalDuration() == null ? other.getTotalDuration() == null : this.getTotalDuration().equals(other.getTotalDuration())) + && (this.getFinishedDuration() == null ? other.getFinishedDuration() == null : this.getFinishedDuration().equals(other.getFinishedDuration())) + && (this.getRealDuration() == null ? other.getRealDuration() == null : this.getRealDuration().equals(other.getRealDuration())) + && (this.getIsFinished() == null ? other.getIsFinished() == null : this.getIsFinished().equals(other.getIsFinished())) + && (this.getFinishedAt() == null ? other.getFinishedAt() == null : this.getFinishedAt().equals(other.getFinishedAt())) + && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt())) + && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode()); + result = prime * result + ((getHourId() == null) ? 0 : getHourId().hashCode()); + result = prime * result + ((getTotalDuration() == null) ? 0 : getTotalDuration().hashCode()); + result = prime * result + ((getFinishedDuration() == null) ? 0 : getFinishedDuration().hashCode()); + result = prime * result + ((getRealDuration() == null) ? 0 : getRealDuration().hashCode()); + result = prime * result + ((getIsFinished() == null) ? 0 : getIsFinished().hashCode()); + result = prime * result + ((getFinishedAt() == null) ? 0 : getFinishedAt().hashCode()); + result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); + result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", courseId=").append(courseId); + sb.append(", hourId=").append(hourId); + sb.append(", totalDuration=").append(totalDuration); + sb.append(", finishedDuration=").append(finishedDuration); + sb.append(", realDuration=").append(realDuration); + sb.append(", isFinished=").append(isFinished); + sb.append(", finishedAt=").append(finishedAt); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/xyz/playedu/api/domain/UserCourseRecord.java b/src/main/java/xyz/playedu/api/domain/UserCourseRecord.java new file mode 100644 index 0000000..cb45220 --- /dev/null +++ b/src/main/java/xyz/playedu/api/domain/UserCourseRecord.java @@ -0,0 +1,143 @@ +package xyz.playedu.api.domain; + +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 java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * @TableName user_course_records + */ +@TableName(value = "user_course_records") +@Data +public class UserCourseRecord implements Serializable { + /** + * + */ + @TableId(type = IdType.AUTO) + private Integer id; + + /** + * + */ + @JsonProperty("user_id") + private Integer userId; + + /** + * + */ + @JsonProperty("course_id") + private Integer courseId; + + /** + * 课时数量 + */ + @JsonProperty("hour_count") + private Integer hourCount; + + /** + * 已完成课时数 + */ + @JsonProperty("finished_count") + private Integer finishedCount; + + /** + * 进度 + */ + private Integer progress; + + /** + * 看完[1:是,0:否] + */ + @JsonProperty("is_finished") + private Integer isFinished; + + /** + * 看完时间 + */ + @JsonProperty("finished_at") + private Date finishedAt; + + /** + * + */ + @JsonProperty("created_at") + private Date createdAt; + + /** + * + */ + @JsonProperty("updated_at") + private Date updatedAt; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserCourseRecord other = (UserCourseRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId())) + && (this.getHourCount() == null ? other.getHourCount() == null : this.getHourCount().equals(other.getHourCount())) + && (this.getFinishedCount() == null ? other.getFinishedCount() == null : this.getFinishedCount().equals(other.getFinishedCount())) + && (this.getProgress() == null ? other.getProgress() == null : this.getProgress().equals(other.getProgress())) + && (this.getIsFinished() == null ? other.getIsFinished() == null : this.getIsFinished().equals(other.getIsFinished())) + && (this.getFinishedAt() == null ? other.getFinishedAt() == null : this.getFinishedAt().equals(other.getFinishedAt())) + && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt())) + && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode()); + result = prime * result + ((getHourCount() == null) ? 0 : getHourCount().hashCode()); + result = prime * result + ((getFinishedCount() == null) ? 0 : getFinishedCount().hashCode()); + result = prime * result + ((getProgress() == null) ? 0 : getProgress().hashCode()); + result = prime * result + ((getIsFinished() == null) ? 0 : getIsFinished().hashCode()); + result = prime * result + ((getFinishedAt() == null) ? 0 : getFinishedAt().hashCode()); + result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); + result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", courseId=").append(courseId); + sb.append(", hourCount=").append(hourCount); + sb.append(", finishedCount=").append(finishedCount); + sb.append(", progress=").append(progress); + sb.append(", isFinished=").append(isFinished); + sb.append(", finishedAt=").append(finishedAt); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/xyz/playedu/api/domain/UserLearnDurationRecord.java b/src/main/java/xyz/playedu/api/domain/UserLearnDurationRecord.java new file mode 100644 index 0000000..97c7b4c --- /dev/null +++ b/src/main/java/xyz/playedu/api/domain/UserLearnDurationRecord.java @@ -0,0 +1,106 @@ +package xyz.playedu.api.domain; + +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 java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * + * @TableName user_learn_duration_records + */ +@TableName(value ="user_learn_duration_records") +@Data +public class UserLearnDurationRecord implements Serializable { + /** + * + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * + */ + @JsonProperty("user_id") + private Integer userId; + + /** + * + */ + private Date date; + + /** + * 已学习时长[微秒] + */ + private Integer duration; + + /** + * 开始时间 + */ + @JsonProperty("start_at") + private Date startAt; + + /** + * 结束时间 + */ + @JsonProperty("end_at") + private Date endAt; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserLearnDurationRecord other = (UserLearnDurationRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate())) + && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration())) + && (this.getStartAt() == null ? other.getStartAt() == null : this.getStartAt().equals(other.getStartAt())) + && (this.getEndAt() == null ? other.getEndAt() == null : this.getEndAt().equals(other.getEndAt())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode()); + result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode()); + result = prime * result + ((getStartAt() == null) ? 0 : getStartAt().hashCode()); + result = prime * result + ((getEndAt() == null) ? 0 : getEndAt().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", date=").append(date); + sb.append(", duration=").append(duration); + sb.append(", startAt=").append(startAt); + sb.append(", endAt=").append(endAt); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/xyz/playedu/api/mapper/UserCourseHourRecordMapper.java b/src/main/java/xyz/playedu/api/mapper/UserCourseHourRecordMapper.java new file mode 100644 index 0000000..b39d858 --- /dev/null +++ b/src/main/java/xyz/playedu/api/mapper/UserCourseHourRecordMapper.java @@ -0,0 +1,20 @@ +package xyz.playedu.api.mapper; + +import org.apache.ibatis.annotations.Mapper; +import xyz.playedu.api.domain.UserCourseHourRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author tengteng +* @description 针对表【user_course_hour_records】的数据库操作Mapper +* @createDate 2023-03-20 16:41:08 +* @Entity xyz.playedu.api.domain.UserCourseHourRecord +*/ +@Mapper +public interface UserCourseHourRecordMapper extends BaseMapper { + +} + + + + diff --git a/src/main/java/xyz/playedu/api/mapper/UserCourseRecordMapper.java b/src/main/java/xyz/playedu/api/mapper/UserCourseRecordMapper.java new file mode 100644 index 0000000..b5a2dbf --- /dev/null +++ b/src/main/java/xyz/playedu/api/mapper/UserCourseRecordMapper.java @@ -0,0 +1,20 @@ +package xyz.playedu.api.mapper; + +import org.apache.ibatis.annotations.Mapper; +import xyz.playedu.api.domain.UserCourseRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author tengteng +* @description 针对表【user_course_records】的数据库操作Mapper +* @createDate 2023-03-20 16:41:04 +* @Entity xyz.playedu.api.domain.UserCourseRecord +*/ +@Mapper +public interface UserCourseRecordMapper extends BaseMapper { + +} + + + + diff --git a/src/main/java/xyz/playedu/api/mapper/UserLearnDurationRecordMapper.java b/src/main/java/xyz/playedu/api/mapper/UserLearnDurationRecordMapper.java new file mode 100644 index 0000000..13ebbfb --- /dev/null +++ b/src/main/java/xyz/playedu/api/mapper/UserLearnDurationRecordMapper.java @@ -0,0 +1,20 @@ +package xyz.playedu.api.mapper; + +import org.apache.ibatis.annotations.Mapper; +import xyz.playedu.api.domain.UserLearnDurationRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author tengteng +* @description 针对表【user_learn_duration_records】的数据库操作Mapper +* @createDate 2023-03-20 16:41:12 +* @Entity xyz.playedu.api.domain.UserLearnDurationRecord +*/ +@Mapper +public interface UserLearnDurationRecordMapper extends BaseMapper { + +} + + + + diff --git a/src/main/java/xyz/playedu/api/service/UserCourseHourRecordService.java b/src/main/java/xyz/playedu/api/service/UserCourseHourRecordService.java new file mode 100644 index 0000000..a14c72b --- /dev/null +++ b/src/main/java/xyz/playedu/api/service/UserCourseHourRecordService.java @@ -0,0 +1,13 @@ +package xyz.playedu.api.service; + +import xyz.playedu.api.domain.UserCourseHourRecord; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author tengteng +* @description 针对表【user_course_hour_records】的数据库操作Service +* @createDate 2023-03-20 16:41:08 +*/ +public interface UserCourseHourRecordService extends IService { + +} diff --git a/src/main/java/xyz/playedu/api/service/UserCourseRecordService.java b/src/main/java/xyz/playedu/api/service/UserCourseRecordService.java new file mode 100644 index 0000000..3a09655 --- /dev/null +++ b/src/main/java/xyz/playedu/api/service/UserCourseRecordService.java @@ -0,0 +1,13 @@ +package xyz.playedu.api.service; + +import xyz.playedu.api.domain.UserCourseRecord; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author tengteng +* @description 针对表【user_course_records】的数据库操作Service +* @createDate 2023-03-20 16:41:04 +*/ +public interface UserCourseRecordService extends IService { + +} diff --git a/src/main/java/xyz/playedu/api/service/UserLearnDurationRecordService.java b/src/main/java/xyz/playedu/api/service/UserLearnDurationRecordService.java new file mode 100644 index 0000000..be2fa8b --- /dev/null +++ b/src/main/java/xyz/playedu/api/service/UserLearnDurationRecordService.java @@ -0,0 +1,13 @@ +package xyz.playedu.api.service; + +import xyz.playedu.api.domain.UserLearnDurationRecord; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author tengteng +* @description 针对表【user_learn_duration_records】的数据库操作Service +* @createDate 2023-03-20 16:41:12 +*/ +public interface UserLearnDurationRecordService extends IService { + +} diff --git a/src/main/java/xyz/playedu/api/service/impl/UserCourseHourRecordServiceImpl.java b/src/main/java/xyz/playedu/api/service/impl/UserCourseHourRecordServiceImpl.java new file mode 100644 index 0000000..0ad5879 --- /dev/null +++ b/src/main/java/xyz/playedu/api/service/impl/UserCourseHourRecordServiceImpl.java @@ -0,0 +1,22 @@ +package xyz.playedu.api.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import xyz.playedu.api.domain.UserCourseHourRecord; +import xyz.playedu.api.service.UserCourseHourRecordService; +import xyz.playedu.api.mapper.UserCourseHourRecordMapper; +import org.springframework.stereotype.Service; + +/** +* @author tengteng +* @description 针对表【user_course_hour_records】的数据库操作Service实现 +* @createDate 2023-03-20 16:41:08 +*/ +@Service +public class UserCourseHourRecordServiceImpl extends ServiceImpl + implements UserCourseHourRecordService{ + +} + + + + diff --git a/src/main/java/xyz/playedu/api/service/impl/UserCourseRecordServiceImpl.java b/src/main/java/xyz/playedu/api/service/impl/UserCourseRecordServiceImpl.java new file mode 100644 index 0000000..94b72e7 --- /dev/null +++ b/src/main/java/xyz/playedu/api/service/impl/UserCourseRecordServiceImpl.java @@ -0,0 +1,22 @@ +package xyz.playedu.api.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import xyz.playedu.api.domain.UserCourseRecord; +import xyz.playedu.api.service.UserCourseRecordService; +import xyz.playedu.api.mapper.UserCourseRecordMapper; +import org.springframework.stereotype.Service; + +/** +* @author tengteng +* @description 针对表【user_course_records】的数据库操作Service实现 +* @createDate 2023-03-20 16:41:04 +*/ +@Service +public class UserCourseRecordServiceImpl extends ServiceImpl + implements UserCourseRecordService{ + +} + + + + diff --git a/src/main/java/xyz/playedu/api/service/impl/UserLearnDurationRecordServiceImpl.java b/src/main/java/xyz/playedu/api/service/impl/UserLearnDurationRecordServiceImpl.java new file mode 100644 index 0000000..718b7f0 --- /dev/null +++ b/src/main/java/xyz/playedu/api/service/impl/UserLearnDurationRecordServiceImpl.java @@ -0,0 +1,22 @@ +package xyz.playedu.api.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import xyz.playedu.api.domain.UserLearnDurationRecord; +import xyz.playedu.api.service.UserLearnDurationRecordService; +import xyz.playedu.api.mapper.UserLearnDurationRecordMapper; +import org.springframework.stereotype.Service; + +/** +* @author tengteng +* @description 针对表【user_learn_duration_records】的数据库操作Service实现 +* @createDate 2023-03-20 16:41:12 +*/ +@Service +public class UserLearnDurationRecordServiceImpl extends ServiceImpl + implements UserLearnDurationRecordService{ + +} + + + + diff --git a/src/main/resources/mapper/UserCourseHourRecordMapper.xml b/src/main/resources/mapper/UserCourseHourRecordMapper.xml new file mode 100644 index 0000000..0ded197 --- /dev/null +++ b/src/main/resources/mapper/UserCourseHourRecordMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + id,user_id,course_id, + hour_id,total_duration,finished_duration, + real_duration,is_finished,finished_at, + created_at,updated_at + + diff --git a/src/main/resources/mapper/UserCourseRecordMapper.xml b/src/main/resources/mapper/UserCourseRecordMapper.xml new file mode 100644 index 0000000..9af7632 --- /dev/null +++ b/src/main/resources/mapper/UserCourseRecordMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + id,user_id,course_id, + hour_count,finished_count,progress, + is_finished,finished_at,created_at, + updated_at + + diff --git a/src/main/resources/mapper/UserLearnDurationRecordMapper.xml b/src/main/resources/mapper/UserLearnDurationRecordMapper.xml new file mode 100644 index 0000000..8d3c788 --- /dev/null +++ b/src/main/resources/mapper/UserLearnDurationRecordMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + id,user_id,date, + duration,start_at,end_at + +