package com.jwipc.contract.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.contract.entity.ContractDetail;
import com.jwipc.contract.mapper.ContractDetailMapper;
import com.jwipc.contract.model.po.ContractDetailPO;
import com.jwipc.contract.model.query.ChoseSupplierListQuery;
import com.jwipc.contract.model.query.ContractMangeQuery;
import com.jwipc.contract.model.query.ChoseSupplierListQuery;
import com.jwipc.contract.service.IContractDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zx
 * @since 2024-03-13
 */
@Service
public class ContractDetailServiceImpl extends ServiceImpl<ContractDetailMapper, ContractDetail> implements IContractDetailService {
    @Override
    public List<ContractDetail> selectReceiptContractDetailListPage(Page<ContractDetail> page, ChoseSupplierListQuery query) {
        return baseMapper.selectReceiptContractDetailListPage(page,query);
    }
    @Override
    public List<ContractDetailPO> findListPage(Page<ContractDetailPO> page, ChoseSupplierListQuery query) {
        if (page==null){
            return baseMapper.selectListByPage(query);
        }
        return baseMapper.selectListByPage(page,query);
    }

    @Override
    public List<ContractDetail> selectReceiptContractDetailList(ChoseSupplierListQuery query) {
        return baseMapper.selectReceiptContractDetailList(query);
    }
}
