|
@@ -0,0 +1,36 @@
|
|
|
+package com.zhentao.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.zhentao.controller.Catalog.dto.CatalogDto;
|
|
|
+import com.zhentao.domain.Catalog;
|
|
|
+import com.zhentao.dto.Result;
|
|
|
+import com.zhentao.service.CatalogService;
|
|
|
+import com.zhentao.mapper.CatalogMapper;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+* @author 86183
|
|
|
+* @description 针对表【catalog(课程目录表)】的数据库操作Service实现
|
|
|
+* @createDate 2025-05-13 16:26:45
|
|
|
+*/
|
|
|
+@Service
|
|
|
+public class CatalogServiceImpl extends ServiceImpl<CatalogMapper, Catalog>
|
|
|
+ implements CatalogService{
|
|
|
+ @Autowired
|
|
|
+ private CatalogMapper catalogMapper;
|
|
|
+ @Override
|
|
|
+ public Result findAll(CatalogDto catalogDto) {
|
|
|
+ QueryWrapper<Catalog> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("course_id",catalogDto.getId());
|
|
|
+ List<Catalog> catalogs = catalogMapper.selectList(queryWrapper);
|
|
|
+ return Result.OK("查询成功",catalogs);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|