mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
fix: page接口增加出参字段isPermission;
page接口显示顺序
This commit is contained in:
@@ -121,7 +121,8 @@ public class CourseDao extends BaseDao<Course> {
|
||||
builder.append("c.enabled,");
|
||||
builder.append("c.open_course AS openCourse,");
|
||||
builder.append("c.is_top AS isTop,");
|
||||
builder.append("COALESCE(tch.teacher_names, '') AS teacherName");
|
||||
builder.append("COALESCE(tch.teacher_names, '') AS teacherName,");
|
||||
builder.append("c.sort_weight AS sortWeight");
|
||||
// 拼接FROM及查询条件语句
|
||||
appendFrom(builder, queryDTO, isSystemAdmin, orgIds, currentAccountId);
|
||||
// 排序语句
|
||||
@@ -193,6 +194,7 @@ public class CourseDao extends BaseDao<Course> {
|
||||
vo.setOpenCourse((Integer) row[20]);
|
||||
vo.setIsTop((Boolean) row[21]);
|
||||
vo.setTeacherName((String) row[22]);
|
||||
vo.setSortWeight((Integer) row[23]);
|
||||
coursePageVos.add(vo);
|
||||
}
|
||||
return coursePageVos;
|
||||
|
||||
@@ -164,6 +164,7 @@ public class CoursePageServiceImpl implements ICoursePageService {
|
||||
}
|
||||
return courseList.stream()
|
||||
.map(c -> convertToVo(c, courseTeacherList))
|
||||
.sorted(Comparator.comparing(CoursePageVo::getSortWeight)) // 按照sortWeight字段进行排序
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@@ -150,4 +150,11 @@ public class CoursePageVo {
|
||||
* 排序权重
|
||||
*/
|
||||
private Integer sortWeight;
|
||||
|
||||
/**
|
||||
* 是否权限课程
|
||||
* 默认为true
|
||||
* TODO 在线课优化二期会对此字段进行其他的赋值操作
|
||||
*/
|
||||
private Boolean isPermission = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user