diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java index 39d12721..3feabbd4 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java @@ -412,6 +412,8 @@ public class StudyCourseApi extends ApiBaseController{ } //追加学习时长,学习时长是单独的记录,这里不再进行记录 //studyService.appendStudyDuration(st); + List allUserList = thirdApi.getStudyCourseList(sci.getStudyId() ,sci.getCourseId(), token); + log.info("在线课学习记录"+allUserList); return success(item.getId()); } //如果不存在,就创建,这种情况应该不存在 @@ -420,6 +422,8 @@ public class StudyCourseApi extends ApiBaseController{ sci.setAname(cuser.getName()); sci.setProgress(100); studyService.saveStudyInfo(sci,token); + List allUserList = thirdApi.getStudyCourseList(sci.getStudyId() ,sci.getCourseId(), token); + log.info("在线课学习记录"+allUserList); return success(sci.getStudyItemId()); }catch(Exception e) { log.error("记录学习课程内容完成错误",e); @@ -509,7 +513,7 @@ public class StudyCourseApi extends ApiBaseController{ } try { studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum,token); - List allUserList = thirdApi.getStudyCourseList(studyId,courseId, token); + List allUserList = thirdApi.getStudyCourseList(studyId ,courseId, token); log.info("在线课学习记录"+allUserList); return success(true); }catch(Exception e) { @@ -551,7 +555,7 @@ public class StudyCourseApi extends ApiBaseController{ */ @Deprecated @RequestMapping(value="/appendtime",method = {RequestMethod.GET,RequestMethod.POST}) - public JsonResponse appendTime(StudyTime studyTime){ + public JsonResponse appendTime(StudyTime studyTime, HttpServletRequest request){ if(StringUtils.isBlank(studyTime.getStudyId())){ return error("参数错误"); @@ -565,11 +569,17 @@ public class StudyCourseApi extends ApiBaseController{ CurrentUser cuser=getCurrent(); studyTime.setStudentId(cuser.getAccountId()); studyTime.setStudentName(cuser.getName()); + String token = request.getHeader("Xboe-Access-Token"); + if (StringUtils.isEmpty(token)) { + token = request.getHeader("token"); + } try { //此处需要优化处理, //不能直接记录追加学习时间。以后增加到队列中,后台服务定时从队列中读取, 更新到系统中 //studyService.appendStudyDuration(studyTime); studyService.appendStudyDuration(studyTime.getStudyId(),null,studyTime.getContentId(),studyTime.getDuration()); + List allUserList = thirdApi.getStudyCourseList(studyTime.getStudyId() ,studyTime.getCourseId(), token); + log.info("在线课学习记录"+allUserList); return success(studyTime.getId()); }catch(Exception e) { log.error("记录学习时长错误",e);