package com.huyi.service.supplierCreditLine.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huyi.service.creditLine.mapper.CreditLineMapper;
import com.huyi.service.creditLine.service.CreditLineService;
import com.huyi.service.supplierCreditLine.mapper.SupplierCreditLineMapper;
import com.huyi.service.supplierCreditLine.service.SupplierCreditLineService;
import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SupplierCreditLineServiceImpl implements SupplierCreditLineService {
    @Autowired
    private SupplierCreditLineMapper supplierCreditLineMapper;


    @Override
    public IPage<Map> selectSupplierCreditLineList(Map map, QueryRequest request) {
        Page page = new Page<>(request.getPageNum(), request.getPageSize());
        return supplierCreditLineMapper.selectSupplierCreditLineList(page,map);
    }

    @Override
    public List<Map> selectSupplierCreditLineDetail(Map map){
        return supplierCreditLineMapper.selectSupplierCreditLineDetail(map);
    }

    @Override
    public List<Map> listCompanyRel(Map map){
        return supplierCreditLineMapper.listCompanyRel(map);
    }
}
