package com.jwipc.sys.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.sys.entity.SupplierEmail;
import com.jwipc.sys.mapper.SupplierEmailMapper;
import com.jwipc.sys.model.po.SupplierEmailPO;
import com.jwipc.sys.model.query.SupplierEmailQuery;
import com.jwipc.sys.service.ISupplierEmailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 供应商邮箱配置表 服务实现类
 * </p>
 *
 * @author Al
 * @since 2024-04-24
 */
@Service
public class SupplierEmailServiceImpl extends ServiceImpl<SupplierEmailMapper, SupplierEmail> implements ISupplierEmailService {
    @Override
    public List<SupplierEmailPO> findPageByQuery(Page<SupplierEmail> dbPage, SupplierEmailQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
    @Override
    public SupplierEmailPO getDataById(Long id) {
        return baseMapper.getDataById(id);
    }

    @Override
    public List<SupplierEmailPO> selectAllUser(String supplierCode) {
        return baseMapper.selectAllUser(supplierCode);
    }

}
