qinhouyu 1 anno fa
parent
commit
00654cb980

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java

@@ -34,6 +34,14 @@ public class SysNoticeController extends BaseController {
     public TableDataInfo<SysNotice> list(SysNotice notice, PageQuery pageQuery) {
     public TableDataInfo<SysNotice> list(SysNotice notice, PageQuery pageQuery) {
         return noticeService.selectPageNoticeList(notice, pageQuery);
         return noticeService.selectPageNoticeList(notice, pageQuery);
     }
     }
+    /**
+     * 获取通知公告列表App
+     */
+    @SaCheckPermission("system:notice:list")
+    @GetMapping("/listApp")
+    public TableDataInfo<SysNotice> selectPageNoticeListApp(SysNotice notice, PageQuery pageQuery) {
+        return noticeService.selectPageNoticeListApp(notice, pageQuery);
+    }
 
 
     /**
     /**
      * 根据通知公告编号获取详细信息
      * 根据通知公告编号获取详细信息

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysNoticeService.java

@@ -15,6 +15,7 @@ public interface ISysNoticeService {
 
 
 
 
     TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice, PageQuery pageQuery);
     TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice, PageQuery pageQuery);
+    TableDataInfo<SysNotice> selectPageNoticeListApp(SysNotice notice, PageQuery pageQuery);
 
 
     /**
     /**
      * 查询公告信息
      * 查询公告信息

+ 17 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java

@@ -35,6 +35,23 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
         return TableDataInfo.build(page);
         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);
+    }
+
     /**
     /**
      * 查询公告信息
      * 查询公告信息
      *
      *