package com.jwipc.order.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.order.entity.PurchaseOrderBom;
import com.jwipc.order.mapper.PurchaseOrderBomMapper;
import com.jwipc.order.model.po.PurchaseOrderBomPO;
import com.jwipc.order.model.query.PurchaseOrderBomQuery;
import com.jwipc.order.service.IPurchaseOrderBomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 采购订单bom表 服务实现类
 * </p>
 *
 * @author Al
 * @since 2024-03-26
 */
@Service
public class PurchaseOrderBomServiceImpl extends ServiceImpl<PurchaseOrderBomMapper, PurchaseOrderBom> implements IPurchaseOrderBomService {
    @Override
    public List<PurchaseOrderBomPO> findPageByQuery(Page<PurchaseOrderBom> dbPage, PurchaseOrderBomQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
    @Override
    public PurchaseOrderBomPO getDataById(Long id) {
        return baseMapper.getDataById(id);
    }
}
