mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
Merge branch 'zcwy0525-llf' into dev0525
# Conflicts: # servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java
This commit is contained in:
@@ -412,6 +412,8 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
}
|
||||
//追加学习时长,学习时长是单独的记录,这里不再进行记录
|
||||
//studyService.appendStudyDuration(st);
|
||||
List<StudyCourse> 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<StudyCourse> 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<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId,courseId, token);
|
||||
List<StudyCourse> 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<String> appendTime(StudyTime studyTime){
|
||||
public JsonResponse<String> 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<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyTime.getStudyId() ,studyTime.getCourseId(), token);
|
||||
log.info("在线课学习记录"+allUserList);
|
||||
return success(studyTime.getId());
|
||||
}catch(Exception e) {
|
||||
log.error("记录学习时长错误",e);
|
||||
|
||||
Reference in New Issue
Block a user