mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-08 10:26:48 +08:00
首页课程排行榜排序问题
This commit is contained in:
@@ -148,8 +148,18 @@ public class PortalIndexApi extends ApiBaseController{
|
||||
// coursePageList.getList().remove(coursePageList.getList().size()-i);
|
||||
}
|
||||
}
|
||||
if(!courses.isEmpty()){
|
||||
for (Course c:courses) {
|
||||
for (Course c1:pageList.getList()) {
|
||||
if(c.getId().equals(c1.getId())){
|
||||
pageList.getList().remove(c1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//去重并添加
|
||||
|
||||
//并添加
|
||||
|
||||
for (Course c:coursePageList.getList()) {
|
||||
if(pageList.getList().size()<6){
|
||||
@@ -160,15 +170,7 @@ public class PortalIndexApi extends ApiBaseController{
|
||||
}
|
||||
}
|
||||
|
||||
//计算下标,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//去重,
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user