课程和标签排序
This commit is contained in:
@@ -17,6 +17,8 @@ public class CourseToSociologyEntity {
|
||||
|
||||
private Integer sociologyId;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
|
||||
@@ -77,4 +77,10 @@ public class CourseSociologyController {
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping("/updateCourseToSociologySort")
|
||||
public R updateCourseToSociologySort(@RequestBody CourseToSociologyEntity courseToSociologyEntity){
|
||||
courseToSociologyService.updateById(courseToSociologyEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
||||
wrapper.selectAs(CourseToSociologyEntity::getId,"bindId");
|
||||
wrapper.leftJoin(CourseEntity.class,CourseEntity::getId,CourseToSociologyEntity::getCourseId);
|
||||
wrapper.eq(CourseToSociologyEntity::getSociologyId,sociologyId);
|
||||
wrapper.orderByAsc(CourseToSociologyEntity::getSort);
|
||||
List<CourseEntity> courseEntities = courseToSociologyDao.selectJoinList(CourseEntity.class, wrapper);
|
||||
return courseEntities;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user