package org.jeecg.modules.xcx.notice.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.xcx.notice.service.INoticeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "公告接口")
@Slf4j
@RestController
@RequestMapping("/notice")
public class NoticeController {

    @Resource
    private INoticeService noticeService;

    @ApiOperation(value = "公告", notes = "公告")
    @GetMapping("/list")
    public Result<?> getNotice(){
        return noticeService.getNotice();
    }

    @ApiOperation(value = "详情", notes = "详情")
    @GetMapping("/detail")
    public Result<?> getNoticeDetail(String id){
        return noticeService.getNoticeDetail(id);
    }

}
