From fc98025a3ad20b9bddd155e3555f0d5c69257cd6 Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Mon, 29 Jul 2024 19:21:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=9A=82=E5=AD=98?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/xboe/school/study/api/StudyCourseApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 37be858c..9e875451 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 @@ -540,7 +540,7 @@ public class StudyCourseApi extends ApiBaseController{ //检查是否已存在 try { studyService.updateLastTime(itemId,videoTime, getCurrent().getAccountId()); - if (contentId != null && courseId != null){ + if (contentId != null && courseId != null && progressVideo != null){ contentService.updateProcessVideo(contentId, courseId, progressVideo); } return success(true); From 30aab6eab4135038dd0d97bdc4bd5493bede3b3f Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Thu, 15 Aug 2024 19:03:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=84=E7=90=86study=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8Cstudyitemid=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../school/study/service/impl/StudyServiceImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java index 0320f6bd..2a310cb6 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java @@ -98,8 +98,15 @@ public class StudyServiceImpl implements IStudyService{ //sci.setProgress(100);//直接设置为学习完成 sci.setLastTime(ldt); scItemDao.saveOrUpdate(sci); - - dto.setStudyItemId(sci.getId()); + 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()); + }else { + throw new IllegalArgumentException("StudyItemId不能为空"); + } //检查是否全部学习完成 scDao.finishCheck(dto.getStudyId(),dto.getCourseId(),dto.getContentTotal(),token); From 6492e3b0dd29a9eecc629a2f0b34db22518559a7 Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Thu, 15 Aug 2024 19:18:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A4=84=E7=90=86study=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8Cstudyitemid=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../school/study/service/impl/StudyServiceImpl.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java index 2a310cb6..6d0ddf1e 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java @@ -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); From 7fe53c026ee57832b9bb4329d4f9ab9050702bce Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Thu, 15 Aug 2024 19:26:10 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A4=84=E7=90=86study=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8Cstudyitemid=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xboe/school/study/service/impl/StudyServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java index 6d0ddf1e..39fa4e4c 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java @@ -101,6 +101,7 @@ public class StudyServiceImpl implements IStudyService{ if (sci.getId() != null){ dto.setStudyItemId(sci.getId()); }else { + log.info("学习记录id不能为空"+sci.getId()); throw new IllegalArgumentException("学习记录id不能为空"); } //检查是否全部学习完成