package com.ruoyi.web.work.api;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.web.work.domain.Notice;
import com.ruoyi.web.work.service.INoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * 通知公告
 * @author 高伟森
 * @date 2024-04-18
 */
@RestController
@RequestMapping("/app/notice")
@Api( tags = "通知公告 小程序")
public class Api_NoticeController extends BaseController {
    @Autowired
    private INoticeService noticeService;


    @GetMapping
    @ApiOperation( value = "获取通知")
    @Anonymous
    public AjaxResult queryList(){
        List<Notice> noticeList = noticeService.queryList();
        return AjaxResult.success(noticeList);
    }
}
