列表结果添加初级基础等

This commit is contained in:
wuchunlei
2024-05-31 11:14:11 +08:00
parent 7cabd0e921
commit e60b630fd9
3 changed files with 8 additions and 0 deletions

View File

@@ -40,4 +40,8 @@ public class CourseEntity {
private Date endTime;
@TableField(exist = false)
private Integer toSociologySort;
@TableField(exist = false)
private Integer level;
@TableField(exist = false)
private Integer selective;
}

View File

@@ -129,6 +129,8 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
wrapper.selectAll(CourseEntity.class);
wrapper.selectAs(CourseToMedicine::getId,"bindId");
wrapper.selectAs(CourseToMedicine::getSort,"toSociologySort");
wrapper.selectAs(CourseToMedicine::getLevel,"level");
wrapper.selectAs(CourseToMedicine::getSelective,"selective");
wrapper.leftJoin(CourseEntity.class,CourseEntity::getId, CourseToMedicine::getCourseId);
wrapper.eq(CourseToMedicine::getMedicalId,medicalId);
wrapper.orderByAsc(CourseToMedicine::getSort);

View File

@@ -23,6 +23,8 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
public Page<CourseEntity> getMedicalCourseList(ParamTo param) {
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper<>();
wrapper.selectAll(CourseEntity.class);
wrapper.selectAs(CourseToMedicine::getLevel,"level");
wrapper.selectAs(CourseToMedicine::getSelective,"selective");
wrapper.leftJoin(CourseToMedicine.class, CourseToMedicine::getCourseId,CourseEntity::getId);
wrapper.eq(CourseToMedicine::getMedicalId,param.getId());
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()),CourseEntity.class, wrapper);