|
@@ -86,16 +86,22 @@ public class PostNoticeServiceImpl implements IPostNoticeService
|
|
|
}
|
|
|
}else {
|
|
|
//时间为空
|
|
|
- return postNoticeMapper.selectPostNoticeListByTitle(title);
|
|
|
+ return postNoticeMapper.selectPostNoticeListByTitleOrNoticeTime(title, noticeTimeLeft, noticeTimeRight);
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
//标题为空
|
|
|
- if (noticeTimeLeft != null && noticeTimeRight != null && noticeTimeLeft.before(noticeTimeRight)) {
|
|
|
- //时间不为空
|
|
|
- return postNoticeMapper.selectPostNoticeListOnlyByTitleOrNoticeTime(noticeTimeLeft, noticeTimeRight);
|
|
|
+ if (noticeTimeLeft != null && noticeTimeRight != null) {
|
|
|
+ //时间不为空 ,且左时间在右时间之前
|
|
|
+ if( noticeTimeLeft.before(noticeTimeRight)) {
|
|
|
+ return postNoticeMapper.selectPostNoticeListByTitleOrNoticeTime(title, noticeTimeLeft, noticeTimeRight);
|
|
|
+ }else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- return null;
|
|
|
+ PostNotice postNotice = new PostNotice();
|
|
|
+ return postNoticeMapper.selectPostNoticeList(postNotice);
|
|
|
}
|
|
|
|
|
|
|