调整验证顺序,删除过期公告

master
duhui 2021-05-14 10:11:34 +08:00
parent dbd1526fef
commit 604946c065
1 changed files with 4 additions and 4 deletions

View File

@ -60,10 +60,6 @@ public class GetNoticeController extends HttpServlet {
HashSet<String> remove = new HashSet<>();
for (NoticeInfo info : noticeInfoMap.values()) {
// 包名不包含
if (!info.getPackageName().contains(packageName)){
continue;
}
// 获取时间
long now = TimeUtil.nowInt();
long start = TimeUtil.timeStrToSecond(info.getStartTime());
@ -77,6 +73,10 @@ public class GetNoticeController extends HttpServlet {
remove.add(String.valueOf(info.getId()));
continue;
}
// 包名不包含
if (!info.getPackageName().contains(packageName)){
continue;
}
// 最多展示十条
if (list.size() > 10){
break;