From 27daac9ea66e4ef230a97012d69736d1bfe497f0 Mon Sep 17 00:00:00 2001 From: wuchunlei Date: Sat, 12 Oct 2024 16:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8A=9E=E6=A0=A1=E9=AA=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/common/service/impl/ClassEntityServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/peanut/modules/common/service/impl/ClassEntityServiceImpl.java b/src/main/java/com/peanut/modules/common/service/impl/ClassEntityServiceImpl.java index d022cbd3..150a050a 100644 --- a/src/main/java/com/peanut/modules/common/service/impl/ClassEntityServiceImpl.java +++ b/src/main/java/com/peanut/modules/common/service/impl/ClassEntityServiceImpl.java @@ -266,8 +266,9 @@ public class ClassEntityServiceImpl extends ServiceImpl() .eq(ClassTask::getClassId,classEntity.getId()).eq(ClassTask::getType,"0")); - if (taskCount<((classModel.getDays()-classModel.getExamDays())/7.0)){ - return R.error("请发布"+Math.ceil((classModel.getDays()-classModel.getExamDays())/7.0)+"个任务。"); + double allWeek = Math.ceil((classModel.getDays()-classModel.getExamDays())/7.0)-2; + if (taskCount