|
@@ -31,6 +31,24 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
|
|
|
.like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle())
|
|
|
.eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType())
|
|
|
.like(StringUtils.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy());
|
|
|
+ lqw.orderByDesc(SysNotice::getCreateTime);
|
|
|
+ Page<SysNotice> page = baseMapper.selectPage(pageQuery.build(), lqw);
|
|
|
+ return TableDataInfo.build(page);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public TableDataInfo<SysNotice> selectPageNoticeListApp(SysNotice notice, PageQuery pageQuery) {
|
|
|
+ LambdaQueryWrapper<SysNotice> lqw = new LambdaQueryWrapper<SysNotice>();
|
|
|
+ String str = "3";
|
|
|
+ if (StringUtils.isNotBlank(notice.getNoticeType()) && str.equals(notice.getNoticeType())) {
|
|
|
+ lqw.eq(SysNotice::getNoticeType, str);
|
|
|
+ }
|
|
|
+ String[] arr = {"1", "2"};
|
|
|
+ List<String> list = Arrays.asList(arr);
|
|
|
+ if (StringUtils.isNotBlank(notice.getNoticeType()) && list.contains(notice.getNoticeType())) {
|
|
|
+ lqw.in(SysNotice::getNoticeType, list);
|
|
|
+ }
|
|
|
+ lqw.orderByDesc(SysNotice::getCreateTime);
|
|
|
Page<SysNotice> page = baseMapper.selectPage(pageQuery.build(), lqw);
|
|
|
return TableDataInfo.build(page);
|
|
|
}
|