package com.jwipc.sys.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.sys.entity.MsgNotice;
import com.jwipc.sys.mapper.MsgNoticeMapper;
import com.jwipc.sys.model.po.MsgNoticePO;
import com.jwipc.sys.model.query.MsgNoticeQuery;
import com.jwipc.sys.service.IMsgNoticeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 通知公告	 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-01-31
 */
@Service
public class MsgNoticeServiceImpl extends ServiceImpl<MsgNoticeMapper, MsgNotice> implements IMsgNoticeService {

    @Override
    public List<MsgNoticePO> findPageByQuery(Page<MsgNotice> dbPage, MsgNoticeQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }

    @Override
    public MsgNoticePO getDataById(Long id) {
        return baseMapper.getDataById(id);
    }
}
