package com.crunii.micro.service.sysmgr.controller;

import com.crunii.micro.common.dto.PageReq;
import com.crunii.micro.common.dto.PageRsp;
import com.crunii.micro.common.dto.Result;
import com.crunii.micro.domain.dto.Worker;
import com.crunii.micro.service.sysmgr.dto.sysmgr.MessagePageDto;
import com.crunii.micro.service.sysmgr.dto.sysmgr.MessagePageVo;
import com.crunii.micro.service.sysmgr.service.MessageNoticeService;
import com.crunii.micro.web.mvc.CurrWorker;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;

/**
 * @author baoxy
 * @date 2023-07-17
 */
@Api(tags = "我的-消息通知管理")
@RestController
@RequestMapping("/auth/MessageNoticeController")
public class MessageNoticeController {

    @Resource
    private MessageNoticeService messageNoticeService;

    @ApiOperation(value = "分页查询")
    @RequestMapping(path = "pageSearch", method = RequestMethod.POST)
    @ResponseBody
    public Result<PageRsp<MessagePageVo>> pageSearch(@RequestBody PageReq<MessagePageDto> req, @CurrWorker @ApiIgnore Worker worker) {
        return messageNoticeService.pageSearch(req, worker);
    }
}
