serv\web-学习历史修改

This commit is contained in:
2025-10-27 13:42:34 +08:00
parent 74880b429e
commit e50de4a277
31 changed files with 3997 additions and 64 deletions

View File

@@ -0,0 +1,59 @@
package org.xyzh.api.study.history;
import org.xyzh.common.core.domain.ResultDomain;
import org.xyzh.common.dto.study.TbLearningHistory;
import java.util.List;
/**
* @description 学习历史API接口供其他模块调用
* @filename LearningHistoryAPI.java
* @author yslg
* @copyright xyzh
* @since 2025-10-27
*/
public interface LearningHistoryAPI {
/**
* @description 记录学习历史
* @param learningHistory 学习历史
* @return ResultDomain<TbLearningHistory> 记录结果
* @author yslg
* @since 2025-10-27
*/
ResultDomain<TbLearningHistory> recordLearningHistory(TbLearningHistory learningHistory);
/**
* @description 批量记录学习历史
* @param historyList 学习历史列表
* @return ResultDomain<Boolean> 记录结果
* @author yslg
* @since 2025-10-27
*/
ResultDomain<Boolean> batchRecordLearningHistory(List<TbLearningHistory> historyList);
/**
* @description 简化记录方法 - 观看新闻/资源
* @param userId 用户ID
* @param resourceId 资源ID
* @param duration 学习时长(秒)
* @return ResultDomain<TbLearningHistory> 记录结果
* @author yslg
* @since 2025-10-27
*/
ResultDomain<TbLearningHistory> recordResourceView(String userId, String resourceId, Integer duration);
/**
* @description 简化记录方法 - 学习课程
* @param userId 用户ID
* @param courseId 课程ID
* @param chapterId 章节ID可选
* @param nodeId 节点ID可选
* @param duration 学习时长(秒)
* @return ResultDomain<TbLearningHistory> 记录结果
* @author yslg
* @since 2025-10-27
*/
ResultDomain<TbLearningHistory> recordCourseLearn(String userId, String courseId, String chapterId, String nodeId, Integer duration);
}