package com.jwipc.supplier.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.supplier.entity.SupplierAgreement;
import com.jwipc.supplier.mapper.SupplierAgreementMapper;
import com.jwipc.supplier.model.po.SupplierAgreementPO;
import com.jwipc.supplier.model.query.SupplierAgreementQuery;
import com.jwipc.supplier.service.ISupplierAgreementService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 注册协议表 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-02
 */
@Service
public class SupplierAgreementServiceImpl extends ServiceImpl<SupplierAgreementMapper, SupplierAgreement> implements ISupplierAgreementService {

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