Merge branch 'zcwy0606-llf' into dev0525

This commit is contained in:
zhaolongfei
2024-06-19 13:56:28 +08:00
2 changed files with 8 additions and 3 deletions

View File

@@ -144,6 +144,7 @@ public class CourseContentServiceImpl implements ICourseContentService {
} }
@Override @Override
@Transactional
public void updateProcessVideo(String id, String courseId, Float progressVideo) { public void updateProcessVideo(String id, String courseId, Float progressVideo) {
// 处理 processVideo 为 null 的情况 // 处理 processVideo 为 null 的情况
if (progressVideo == null) { if (progressVideo == null) {

View File

@@ -529,7 +529,7 @@ public class StudyCourseApi extends ApiBaseController{
* @return * @return
*/ */
@PostMapping("/study-video-time") @PostMapping("/study-video-time")
public JsonResponse<Boolean> study(String itemId,Integer videoTime,String contentId , String courseId,Float processVideo){ public JsonResponse<Boolean> study(String itemId,Integer videoTime,String contentId , String courseId,Float progressVideo){
if(StringUtils.isBlank(itemId)){ if(StringUtils.isBlank(itemId)){
return error("参数错误"); return error("参数错误");
@@ -537,11 +537,15 @@ public class StudyCourseApi extends ApiBaseController{
if(videoTime==null){ if(videoTime==null){
return error("无时间点"); return error("无时间点");
} }
if (progressVideo == null){
return error("无暂存时间点");
}
//检查是否已存在 //检查是否已存在
try { try {
studyService.updateLastTime(itemId,videoTime,getCurrent().getAccountId()); studyService.updateLastTime(itemId,videoTime, getCurrent().getAccountId());
if (contentId != null && courseId != null){ if (contentId != null && courseId != null){
contentService.updateProcessVideo(contentId, courseId, processVideo); contentService.updateProcessVideo(contentId, courseId, progressVideo);
} }
return success(true); return success(true);
}catch(Exception e) { }catch(Exception e) {