From d47cd60437a784ca413d33e8d6f4f66265ad9426 Mon Sep 17 00:00:00 2001 From: Alan <3052806735@qq.com> Date: Sun, 25 Aug 2024 20:30:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0CONTENT=5FHAS=5FNO=5FKNOWS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/teaching/backend/common/ErrorCode.java | 2 ++ .../service/impl/courses/ObjectiveContentKnowServiceImpl.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/teaching/backend/common/ErrorCode.java b/src/main/java/com/teaching/backend/common/ErrorCode.java index 3db20f0..9679c72 100644 --- a/src/main/java/com/teaching/backend/common/ErrorCode.java +++ b/src/main/java/com/teaching/backend/common/ErrorCode.java @@ -24,6 +24,8 @@ public enum ErrorCode { MESSAGE_NO_EXIT(400012, "消息不存在!"), TOTOAL_OBJECTIVE_CANT_DELETE(400013, "课程总目标内容禁止删除!"), + CONTENT_HAS_NO_KNOWS(400014, "当前课程目标下面没有关联的知识点!"), + NOT_LOGIN_ERROR(40100, "未登录"), NO_AUTH_ERROR(40101, "无权限"), diff --git a/src/main/java/com/teaching/backend/service/impl/courses/ObjectiveContentKnowServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/courses/ObjectiveContentKnowServiceImpl.java index 76f4668..c125417 100644 --- a/src/main/java/com/teaching/backend/service/impl/courses/ObjectiveContentKnowServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/courses/ObjectiveContentKnowServiceImpl.java @@ -18,6 +18,8 @@ import com.teaching.backend.model.entity.knowtmp.Knowtmp; import com.teaching.backend.model.vo.courses.ObjectiveContentKnowVO; import com.teaching.backend.model.vo.knowtmp.KnowTmpVO; import com.teaching.backend.service.courses.IObjectiveContentKnowService; +import com.teaching.backend.utils.CourseCode; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -39,6 +41,7 @@ import java.util.stream.Collectors; * @since 2024-06-13 */ @Service +@Slf4j public class ObjectiveContentKnowServiceImpl extends ServiceImpl implements IObjectiveContentKnowService { @Autowired @@ -108,6 +111,7 @@ public class ObjectiveContentKnowServiceImpl extends ServiceImpl