|
@@ -65,11 +65,12 @@ public class IndexController {
|
|
try {
|
|
try {
|
|
if (!StringUtils.isEmpty(title)) {
|
|
if (!StringUtils.isEmpty(title)) {
|
|
forums = forumService.forumListByUsersIds(0, page, rows, title, types, type);
|
|
forums = forumService.forumListByUsersIds(0, page, rows, title, types, type);
|
|
- for (Forum forum : forums) {
|
|
|
|
- if (!forum.getIsdel().equals(0) || !forum.getStatus().equals(1)) {
|
|
|
|
- forums.remove(forum);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// for (Forum forum : forums) {
|
|
|
|
+// if (!forum.getIsdel().equals(0) || !forum.getStatus().equals(1)) {
|
|
|
|
+// forums.remove(forum);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ forums.removeIf(forum -> !forum.getIsdel().equals(0) || !forum.getStatus().equals(1));
|
|
} else {
|
|
} else {
|
|
forums = forumService.forumListByType(page, rows, type, types);
|
|
forums = forumService.forumListByType(page, rows, type, types);
|
|
}
|
|
}
|
|
@@ -204,11 +205,12 @@ public class IndexController {
|
|
// try {
|
|
// try {
|
|
if (!StringUtils.isEmpty(title)) {
|
|
if (!StringUtils.isEmpty(title)) {
|
|
forums = forumService.forumListByUsersId(0, page, rows, title, types, id);
|
|
forums = forumService.forumListByUsersId(0, page, rows, title, types, id);
|
|
- for (Forum forum : forums) {
|
|
|
|
- if (!forum.getIsdel().equals(0) || !forum.getStatus().equals(1)) {
|
|
|
|
- forums.remove(forum);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// for (Forum forum : forums) {
|
|
|
|
+// if (!forum.getIsdel().equals(0) || !forum.getStatus().equals(1)) {
|
|
|
|
+// forums.remove(forum);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ forums.removeIf(forum -> !forum.getIsdel().equals(0) || !forum.getStatus().equals(1));
|
|
} else {
|
|
} else {
|
|
forums = forumService.forumListByType(page, rows, 2, id);
|
|
forums = forumService.forumListByType(page, rows, 2, id);
|
|
}
|
|
}
|