package com.jwipc.finance.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.CustomsDeclaration;
import com.jwipc.finance.mapper.CustomsDeclarationMapper;
import com.jwipc.finance.model.po.CustomsDeclarationPO;
import com.jwipc.finance.model.query.CustomsDeclarationQuery;
import com.jwipc.finance.service.ICustomsDeclarationService;
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 CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclarationMapper, CustomsDeclaration> implements ICustomsDeclarationService {

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