Merge remote-tracking branch 'origin/dev0525' into dev0525

This commit is contained in:
yang
2024-08-20 15:57:00 +08:00
2 changed files with 7 additions and 2 deletions

View File

@@ -89,7 +89,6 @@ public class StudyHomeWorkApi extends ApiBaseController{
return error("查询课程作业失败",e.getMessage()); return error("查询课程作业失败",e.getMessage());
} }
} }
@PostMapping("/list-study") @PostMapping("/list-study")
public JsonResponse<List<StudyHomeWork>> listByStudyIdContentId(String studyId,String contentId){ public JsonResponse<List<StudyHomeWork>> listByStudyIdContentId(String studyId,String contentId){
if(StringUtils.isBlank(studyId)) { if(StringUtils.isBlank(studyId)) {

View File

@@ -98,8 +98,14 @@ public class StudyServiceImpl implements IStudyService{
//sci.setProgress(100);//直接设置为学习完成 //sci.setProgress(100);//直接设置为学习完成
sci.setLastTime(ldt); sci.setLastTime(ldt);
scItemDao.saveOrUpdate(sci); scItemDao.saveOrUpdate(sci);
dto.setStudyItemId(sci.getId()); dto.setStudyItemId(sci.getId());
if (sci.getId() != null){
dto.setStudyItemId(sci.getId());
}else {
log.info("学习记录id不能为空"+sci.getId());
throw new IllegalArgumentException("学习记录id不能为空");
}
//检查是否全部学习完成 //检查是否全部学习完成
scDao.finishCheck(dto.getStudyId(),dto.getCourseId(),dto.getContentTotal(),token); scDao.finishCheck(dto.getStudyId(),dto.getCourseId(),dto.getContentTotal(),token);