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

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.jdbc.MessageNoticeJdbcDao;
import com.crunii.micro.service.sysmgr.service.MessageNoticeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author baoxy
 * @date 2023-07-17
 */
@Service
public class MessageNoticeServiceImpl implements MessageNoticeService {

    @Resource
    private MessageNoticeJdbcDao messageNoticeJdbcDao;

    @Override
    public Result<PageRsp<MessagePageVo>> pageSearch(PageReq<MessagePageDto> req, Worker worker) {
        return Result.ofSuccess(messageNoticeJdbcDao.pageSearch(req, worker.getLoginId()));
    }
}
