|
|
@ -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.courses.ObjectiveContentKnowVO; |
|
|
|
import com.teaching.backend.model.vo.knowtmp.KnowTmpVO; |
|
|
|
import com.teaching.backend.model.vo.knowtmp.KnowTmpVO; |
|
|
|
import com.teaching.backend.service.courses.IObjectiveContentKnowService; |
|
|
|
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.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -39,6 +41,7 @@ import java.util.stream.Collectors; |
|
|
|
* @since 2024-06-13 |
|
|
|
* @since 2024-06-13 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
@Service |
|
|
|
|
|
|
|
@Slf4j |
|
|
|
public class ObjectiveContentKnowServiceImpl extends ServiceImpl<ObjectiveContentKnowMapper, ObjectiveContentKnow> implements IObjectiveContentKnowService { |
|
|
|
public class ObjectiveContentKnowServiceImpl extends ServiceImpl<ObjectiveContentKnowMapper, ObjectiveContentKnow> implements IObjectiveContentKnowService { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
@ -108,6 +111,7 @@ public class ObjectiveContentKnowServiceImpl extends ServiceImpl<ObjectiveConten |
|
|
|
.eq(ObjectiveContentKnow::getObjectiveContentId, objectiveContentId) |
|
|
|
.eq(ObjectiveContentKnow::getObjectiveContentId, objectiveContentId) |
|
|
|
); |
|
|
|
); |
|
|
|
if(objectiveContentKnows.isEmpty()){ |
|
|
|
if(objectiveContentKnows.isEmpty()){ |
|
|
|
|
|
|
|
log.warn("当前课程目标下面没有关联的知识点contentId:{}",objectiveContentId); |
|
|
|
throw new BusinessException(ErrorCode.CONTENT_HAS_NO_KNOWS); |
|
|
|
throw new BusinessException(ErrorCode.CONTENT_HAS_NO_KNOWS); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|