|
@@ -41,7 +41,7 @@ public class SysNotificationController extends BaseController
|
|
|
/**
|
|
|
* 查询发版通知公告列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('business:notification:list')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:notification:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(SysNotification sysNotification) throws NoSuchFieldException, IllegalAccessException
|
|
|
{
|
|
@@ -109,4 +109,12 @@ public class SysNotificationController extends BaseController
|
|
|
{
|
|
|
return toAjax(sysNotificationService.removeBatchByIds(ids));
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/getUnshowedNotification")
|
|
|
+ public AjaxResult getUnshowedNotification() {
|
|
|
+ // 获取未结束的公告
|
|
|
+ List<SysNotification> list = sysNotificationService.query().eq("status", 2).list();
|
|
|
+ // 假设有一个公告为更新中的公告,另一个公告为非更新中则可以接着查询。
|
|
|
+ return new AjaxResult(list.stream().anyMatch(t -> t.getStatus() == 2) ? 202 : 200, "", list);
|
|
|
+ }
|
|
|
}
|