package com.jwipc.finance.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.CustomsDeclarationDetail;
import com.jwipc.finance.mapper.CustomsDeclarationDetailMapper;
import com.jwipc.finance.model.po.CustomsDeclarationDetailPO;
import com.jwipc.finance.model.query.CustomsDeclarationQuery;
import com.jwipc.finance.service.ICustomsDeclarationDetailService;
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-22
 */
@Service
public class CustomsDeclarationDetailServiceImpl extends ServiceImpl<CustomsDeclarationDetailMapper, CustomsDeclarationDetail> implements ICustomsDeclarationDetailService {

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

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

    @Override
    public List<CustomsDeclarationDetailPO> provideDetailByPaymentMatchingId(Long paymentMatchingId) {
        return baseMapper.provideDetailByPaymentMatchingId(paymentMatchingId);
    }
}
