mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
处理study接口,studyitemid返回值为空的问题
This commit is contained in:
@@ -98,14 +98,10 @@ public class StudyServiceImpl implements IStudyService{
|
||||
//sci.setProgress(100);//直接设置为学习完成
|
||||
sci.setLastTime(ldt);
|
||||
scItemDao.saveOrUpdate(sci);
|
||||
StudyCourseItem sci2 = scItemDao.findOne(FieldFilters
|
||||
.eq("studyId", dto.getStudyId()),FieldFilters
|
||||
.eq("contentId", dto.getContentId()),FieldFilters
|
||||
.eq("aid", dto.getAid()));
|
||||
if (sci2!=null){
|
||||
dto.setStudyItemId(sci2.getId());
|
||||
if (sci.getId() != null){
|
||||
dto.setStudyItemId(sci.getId());
|
||||
}else {
|
||||
throw new IllegalArgumentException("StudyItemId不能为空");
|
||||
throw new IllegalArgumentException("学习记录id不能为空");
|
||||
}
|
||||
//检查是否全部学习完成
|
||||
scDao.finishCheck(dto.getStudyId(),dto.getCourseId(),dto.getContentTotal(),token);
|
||||
|
||||
Reference in New Issue
Block a user