1
This commit is contained in:
@@ -3,6 +3,7 @@ package com.peanut.modules.master.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.ObjectUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.dao.*;
|
||||
@@ -91,6 +92,16 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CourseEntity> getCourseListForSociology(int sociologyId) {
|
||||
MPJLambdaWrapper<CourseToSociologyEntity> wrapper = new MPJLambdaWrapper<>();
|
||||
wrapper.selectAll(CourseEntity.class);
|
||||
wrapper.leftJoin(CourseEntity.class,CourseEntity::getId,CourseToSociologyEntity::getCourseId);
|
||||
wrapper.eq(CourseToSociologyEntity::getSociologyId,sociologyId);
|
||||
List<CourseEntity> courseEntities = courseToSociologyDao.selectJoinList(CourseEntity.class, wrapper);
|
||||
return courseEntities;
|
||||
}
|
||||
|
||||
private List<Integer> categoryIds(Integer id){
|
||||
ArrayList<Integer> integers = new ArrayList<>();
|
||||
CourseCategoryEntity courseCategoryEntity = courseCategoryDao.selectById(id);
|
||||
|
||||
Reference in New Issue
Block a user