太湖英才可绑定课程列表 修改

This commit is contained in:
wuchunlei
2025-06-20 13:36:51 +08:00
parent e5df8fb6ce
commit d2feee9c1c

View File

@@ -56,15 +56,11 @@ public class TaihuTalentController {
//太湖英才可绑定课程列表
@RequestMapping("/getCourseListCanTalent")
public R getCourseListCanTalent(@RequestBody Map<String,Object> params){
List<Integer> collect = courseToTalentService.list(new LambdaQueryWrapper<CourseToTalent>()
.eq(CourseToTalent::getTalentId, params.get("talentId")))
.stream().map(CourseToTalent::getCourseId).collect(Collectors.toList());
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper<>();
wrapper.rightJoin(CourseToTaihumed.class,CourseToTaihumed::getCourseId,CourseEntity::getId);
wrapper.selectAll(CourseEntity.class);
if (collect.size() != 0){
wrapper.notIn(CourseEntity::getId,collect);
}
String sql = "select 1 from course_to_talent where del_flag = 0 and course_id = t1.course_id and talent_id = "+params.get("talentId");
wrapper.notExists(sql);
wrapper.like(StringUtils.isNotBlank(params.get("title").toString()),CourseEntity::getTitle,params.get("title"));
Page<CourseEntity> page = courseService.page(new Page<>(Long.parseLong(params.get("current").toString()),
Long.parseLong(params.get("limit").toString())), wrapper);