This commit is contained in:
wangjinlei
2024-05-16 13:54:42 +08:00
parent 1b3803074d
commit 7beb2b2b2c
6 changed files with 24 additions and 22 deletions

View File

@@ -56,6 +56,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
wrapper.selectAll(CourseEntity.class);
wrapper.leftJoin(CourseToSociologyEntity.class,CourseToSociologyEntity::getCourseId,CourseEntity::getId);
wrapper.eq(CourseToSociologyEntity::getSociologyId,param.getId());
wrapper.orderByAsc(CourseToSociologyEntity::getSort);
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()),CourseEntity.class, wrapper);
return courseEntityPage;
}
@@ -78,6 +79,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
wrapper.selectAll(CourseEntity.class);
wrapper.leftJoin(CourseToMarketEntity.class,CourseToMarketEntity::getCourseId,CourseEntity::getId);
wrapper.eq(CourseToMarketEntity::getMarketId,param.getId());
wrapper.orderByAsc(CourseToSociologyEntity::getSort);
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()), CourseEntity.class, wrapper);
return courseEntityPage;
}