对话、重新生成、评价完成
This commit is contained in:
@@ -62,10 +62,10 @@ public class LearningHistoryController {
|
||||
* POST /study/history/list
|
||||
*
|
||||
* @param filter 过滤条件
|
||||
* @return ResultDomain<List<LearningHistoryVO>> 学习历史列表
|
||||
* @return ResultDomain<LearningHistoryVO> 学习历史列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResultDomain<List<LearningHistoryVO>> getLearningHistories(@RequestBody TbLearningHistory filter) {
|
||||
public ResultDomain<LearningHistoryVO> getLearningHistories(@RequestBody TbLearningHistory filter) {
|
||||
logger.info("查询学习历史列表,用户ID: {}", filter != null ? filter.getUserID() : null);
|
||||
return learningHistoryService.getLearningHistories(filter);
|
||||
}
|
||||
@@ -103,10 +103,10 @@ public class LearningHistoryController {
|
||||
* POST /study/history/my-histories
|
||||
*
|
||||
* @param filter 过滤条件
|
||||
* @return ResultDomain<List<LearningHistoryVO>> 学习历史列表
|
||||
* @return ResultDomain<LearningHistoryVO> 学习历史列表
|
||||
*/
|
||||
@PostMapping("/my-histories")
|
||||
public ResultDomain<List<LearningHistoryVO>> getCurrentUserLearningHistories(@RequestBody(required = false) TbLearningHistory filter) {
|
||||
public ResultDomain<LearningHistoryVO> getCurrentUserLearningHistories(@RequestBody(required = false) TbLearningHistory filter) {
|
||||
logger.info("查询当前用户学习历史");
|
||||
return learningHistoryService.getCurrentUserLearningHistories(filter);
|
||||
}
|
||||
@@ -116,10 +116,10 @@ public class LearningHistoryController {
|
||||
* GET /study/history/recent
|
||||
*
|
||||
* @param limit 限制数量(可选,默认10)
|
||||
* @return ResultDomain<List<LearningHistoryVO>> 学习历史列表
|
||||
* @return ResultDomain<LearningHistoryVO> 学习历史列表
|
||||
*/
|
||||
@GetMapping("/recent")
|
||||
public ResultDomain<List<LearningHistoryVO>> getRecentLearningHistories(@RequestParam(required = false, defaultValue = "10") Integer limit) {
|
||||
public ResultDomain<LearningHistoryVO> getRecentLearningHistories(@RequestParam(required = false, defaultValue = "10") Integer limit) {
|
||||
logger.info("查询最近学习历史,限制数量: {}", limit);
|
||||
// 从当前登录用户获取
|
||||
return learningHistoryService.getRecentLearningHistories(null, limit);
|
||||
|
||||
@@ -23,11 +23,11 @@ public interface SCLearningHistoryService extends LearningHistoryAPI {
|
||||
/**
|
||||
* @description 查询学习历史列表
|
||||
* @param filter 过滤条件
|
||||
* @return ResultDomain<List<LearningHistoryVO>> 学习历史列表
|
||||
* @return ResultDomain<LearningHistoryVO> 学习历史列表
|
||||
* @author yslg
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
ResultDomain<List<LearningHistoryVO>> getLearningHistories(TbLearningHistory filter);
|
||||
ResultDomain<LearningHistoryVO> getLearningHistories(TbLearningHistory filter);
|
||||
|
||||
/**
|
||||
* @description 分页查询学习历史
|
||||
@@ -71,11 +71,11 @@ public interface SCLearningHistoryService extends LearningHistoryAPI {
|
||||
/**
|
||||
* @description 获取当前用户的学习历史
|
||||
* @param filter 过滤条件
|
||||
* @return ResultDomain<List<LearningHistoryVO>> 学习历史列表
|
||||
* @return ResultDomain<LearningHistoryVO> 学习历史列表
|
||||
* @author yslg
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
ResultDomain<List<LearningHistoryVO>> getCurrentUserLearningHistories(TbLearningHistory filter);
|
||||
ResultDomain<LearningHistoryVO> getCurrentUserLearningHistories(TbLearningHistory filter);
|
||||
|
||||
/**
|
||||
* @description 获取当前用户的学习统计
|
||||
@@ -108,10 +108,10 @@ public interface SCLearningHistoryService extends LearningHistoryAPI {
|
||||
* @description 获取用户最近的学习历史
|
||||
* @param userId 用户ID
|
||||
* @param limit 限制数量
|
||||
* @return ResultDomain<List<LearningHistoryVO>> 学习历史列表
|
||||
* @return ResultDomain<LearningHistoryVO> 学习历史列表
|
||||
* @author yslg
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
ResultDomain<List<LearningHistoryVO>> getRecentLearningHistories(String userId, Integer limit);
|
||||
ResultDomain<LearningHistoryVO> getRecentLearningHistories(String userId, Integer limit);
|
||||
}
|
||||
|
||||
|
||||
@@ -176,8 +176,8 @@ public class SCLearningHistoryServiceImpl implements SCLearningHistoryService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<List<LearningHistoryVO>> getLearningHistories(TbLearningHistory filter) {
|
||||
ResultDomain<List<LearningHistoryVO>> resultDomain = new ResultDomain<>();
|
||||
public ResultDomain<LearningHistoryVO> getLearningHistories(TbLearningHistory filter) {
|
||||
ResultDomain<LearningHistoryVO> resultDomain = new ResultDomain<>();
|
||||
|
||||
try {
|
||||
List<LearningHistoryVO> historyVOList = learningHistoryMapper.selectLearningHistoriesWithDetails(filter);
|
||||
@@ -351,8 +351,8 @@ public class SCLearningHistoryServiceImpl implements SCLearningHistoryService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<List<LearningHistoryVO>> getCurrentUserLearningHistories(TbLearningHistory filter) {
|
||||
ResultDomain<List<LearningHistoryVO>> resultDomain = new ResultDomain<>();
|
||||
public ResultDomain<LearningHistoryVO> getCurrentUserLearningHistories(TbLearningHistory filter) {
|
||||
ResultDomain<LearningHistoryVO> resultDomain = new ResultDomain<>();
|
||||
|
||||
try {
|
||||
TbSysUser currentUser = LoginUtil.getCurrentUser();
|
||||
@@ -449,8 +449,8 @@ public class SCLearningHistoryServiceImpl implements SCLearningHistoryService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<List<LearningHistoryVO>> getRecentLearningHistories(String userId, Integer limit) {
|
||||
ResultDomain<List<LearningHistoryVO>> resultDomain = new ResultDomain<>();
|
||||
public ResultDomain<LearningHistoryVO> getRecentLearningHistories(String userId, Integer limit) {
|
||||
ResultDomain<LearningHistoryVO> resultDomain = new ResultDomain<>();
|
||||
|
||||
try {
|
||||
if (userId == null || userId.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user