package com.jwipc.sys.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.sys.entity.PurchaseCategory;
import com.jwipc.sys.mapper.PurchaseCategoryMapper;
import com.jwipc.sys.model.po.PurchaseCategoryPO;
import com.jwipc.sys.model.query.PurchaseCategoryQuery;
import com.jwipc.sys.service.IPurchaseCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 采购品类表 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-04
 */
@Service
public class PurchaseCategoryServiceImpl extends ServiceImpl<PurchaseCategoryMapper, PurchaseCategory> implements IPurchaseCategoryService {

    @Override
    public List<PurchaseCategoryPO> findPageByQuery(Page<PurchaseCategory> dbPage, PurchaseCategoryQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
}
