package com.cyksj.service.information.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyksj.mapper.InformationMapper;
import com.cyksj.model.entity.Information;
import com.cyksj.model.views.InformationListView;
import com.cyksj.service.information.InformationService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zwhui
 * @date 2023/10/12 14:40
 */
@Service
public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements InformationService {


    @Override
    public IPage<InformationListView> getInformation(Long categoryId, Integer start, Integer limit) {
        return baseMapper.getInformation(new Page<>(start,limit),categoryId);
    }


    @Override
    public List<InformationListView> getInformationByTitle(String name) {
        return baseMapper.getInformationByTitle(name);
    }
}
