心灵空间
This commit is contained in:
@@ -12,8 +12,11 @@ import com.peanut.modules.common.entity.*;
|
||||
import com.peanut.modules.common.service.CoursePsycheService;
|
||||
import com.peanut.modules.common.service.MessageService;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
import com.peanut.modules.master.service.CourseCatalogueService;
|
||||
import com.peanut.modules.master.service.CourseToSociologyService;
|
||||
import com.peanut.modules.medical.service.CourseMedicalService;
|
||||
import com.peanut.modules.medical.service.CourseService;
|
||||
import com.peanut.modules.sociology.service.CourseCatalogueChapterService;
|
||||
import com.peanut.modules.sociology.service.CourseSociologyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -51,6 +54,10 @@ public class VisitorController {
|
||||
@Autowired
|
||||
private CourseSociologyService sociologyService;
|
||||
@Autowired
|
||||
private CourseCatalogueService courseCatalogueService;
|
||||
@Autowired
|
||||
private CourseCatalogueChapterService courseCatalogueChapterService;
|
||||
@Autowired
|
||||
private com.peanut.modules.medical.service.ShopProductService productService;
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@@ -254,6 +261,39 @@ public class VisitorController {
|
||||
List<CourseSociologyEntity> labelsTree = sociologyService.getCourseSociologyTree();
|
||||
return R.ok().put("labels",labelsTree);
|
||||
}
|
||||
|
||||
//获取标签下课程
|
||||
@RequestMapping("/getCourseBySociologyId")
|
||||
public R getCourseBySociology(@RequestBody Map params){
|
||||
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.selectAll(CourseEntity.class);
|
||||
wrapper.leftJoin(CourseToSociologyEntity.class,CourseToSociologyEntity::getCourseId,CourseEntity::getId);
|
||||
wrapper.eq(CourseToSociologyEntity::getSociologyId,params.get("sociologyId"));
|
||||
List<CourseEntity> courseList = courseService.list(wrapper);
|
||||
return R.ok().put("courseList",courseList);
|
||||
}
|
||||
//课程详情
|
||||
@RequestMapping("/getSociologyCourseInfo")
|
||||
public R getSociologyCourseInfo(@RequestBody Map params){
|
||||
Map<String, Object> courseDetail = new HashMap<>();
|
||||
//基础信息
|
||||
CourseEntity course = courseService.getById(params.get("courseId").toString());
|
||||
courseDetail.put("course",course);
|
||||
//目录信息
|
||||
List<CourseCatalogueEntity> courseCatalogueEntities = courseCatalogueService.list(new LambdaQueryWrapper<CourseCatalogueEntity>()
|
||||
.eq(CourseCatalogueEntity::getCourseId, course.getId()).orderByAsc(CourseCatalogueEntity::getSort));
|
||||
courseDetail.put("catalogues",courseCatalogueEntities);
|
||||
return R.ok().put("data",courseDetail);
|
||||
}
|
||||
//课程章节
|
||||
@RequestMapping("/getSociologyCourseCatalogueInfo")
|
||||
public R getSociologyCourseCatalogueInfo(@RequestBody Map params){
|
||||
LambdaQueryWrapper<CourseCatalogueChapterEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CourseCatalogueChapterEntity::getCatalogueId,params.get("catalogueId"));
|
||||
wrapper.orderByAsc(CourseCatalogueChapterEntity::getSort);
|
||||
List<CourseCatalogueChapterEntity> list = courseCatalogueChapterService.list(wrapper);
|
||||
return R.ok().put("list",list);
|
||||
}
|
||||
/**
|
||||
* 国学营销标签下商品列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user