package org.jeecg.modules.api.workorderController;

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.apiBean.PageBean;
import org.jeecg.modules.apiService.NewsService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags="公告信息相关接口")
@RestController
@RequestMapping("/workorder/news")
@Slf4j
public class NewController {

    //公告信息
    @Resource
    private NewsService newsService;
    /****************************************************************************************************/

    @ApiOperation(value="公告信息-查询公告列表", notes="公告信息-查询公告列表")
    @RequestMapping(value = "/queryNewsList", method = {RequestMethod.GET})
    public Result<?> queryNewsList(PageBean pageBean){
        return newsService.queryNewsList(pageBean);
    }

    @ApiOperation(value="公告信息-根据id查询公告信息", notes="公告信息-根据id查询公告信息")
    @RequestMapping(value = "/queryNewsById", method = {RequestMethod.GET})
    public Result<?> queryNewsById(String newsId){
        return newsService.queryNewsById(newsId);
    }

}
