package com.jwipc.finance.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.PaymentNoticeDetail;
import com.jwipc.finance.mapper.PaymentNoticeDetailMapper;
import com.jwipc.finance.model.po.PaymentNoticeDetailPO;
import com.jwipc.finance.model.query.PaymentNoticeQuery;
import com.jwipc.finance.service.IPaymentNoticeDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 对账模块-报关单明细表 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2025-10-27
 */
@Service
public class PaymentNoticeDetailServiceImpl extends ServiceImpl<PaymentNoticeDetailMapper, PaymentNoticeDetail> implements IPaymentNoticeDetailService {

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

    @Override
    public List<PaymentNoticeDetailPO> createNoPageList(PaymentNoticeQuery query) {
        return baseMapper.createNoPageList(query);
    }

    @Override
    public List<PaymentNoticeDetailPO> provideDetailByCostMatchingId(Long costMatchingId) {
        return baseMapper.provideDetailByCostMatchingId(costMatchingId);
    }
}
