From d90f4d883f9fed78bb63e80a407d6f6dff190ef4 Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Mon, 8 Jul 2024 15:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E9=95=BF=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CourseContentServiceImpl.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/module/course/service/impl/CourseContentServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/module/course/service/impl/CourseContentServiceImpl.java index bfff283e..a95425c5 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/module/course/service/impl/CourseContentServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/module/course/service/impl/CourseContentServiceImpl.java @@ -55,10 +55,11 @@ public class CourseContentServiceImpl implements ICourseContentService { //新增的情况 cc.setDeleted(false); if (cc.getDuration()==null){ - if (exam != null){ - cc.setDuration(exam.getTestDuration()*60); - }else { - cc.setDuration(0); + cc.setDuration(0); + } + if(exam!=null) { + if (exam.getTestDuration()!=null) { + cc.setDuration(exam.getTestDuration() * 60); } } //如果是没有目录的,并具是课程内容 @@ -70,8 +71,10 @@ public class CourseContentServiceImpl implements ICourseContentService { } ccDao.save(cc); }else { - if (cc.getDuration()!=null) { - cc.setDuration(cc.getDuration()); + if(exam!=null) { + if (exam.getTestDuration()!=null) { + cc.setDuration(exam.getTestDuration() * 60); + } } ccDao.update(cc); cc.setSysVersion(ccDao.getVersion(cc.getId()));