mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 19:36:50 +08:00
首页课程排行榜排序问题
This commit is contained in:
@@ -136,7 +136,7 @@ public class PortalIndexApi extends ApiBaseController{
|
||||
List<Course> courses = courseService.userHobbyList(aid,dto.getOrderField(),dto.getOrderAsc());
|
||||
|
||||
PageList<Course> pageList = new PageList<>();
|
||||
pageList.setList(new ArrayList<>(6));
|
||||
pageList.setList(new ArrayList<>());
|
||||
|
||||
int i=0;
|
||||
if(!courses.isEmpty()){
|
||||
@@ -152,6 +152,10 @@ public class PortalIndexApi extends ApiBaseController{
|
||||
for (Course c1:courses) {
|
||||
if(!c.getId().equals(c1.getId())){
|
||||
pageList.getList().add(c);
|
||||
if(pageList.getList().size()>=6){
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user