package com.bomaos.common.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bomaos.common.core.web.PageParam;
import com.bomaos.common.core.web.PageResult;
import com.bomaos.common.system.entity.Supplier;
import com.bomaos.common.system.mapper.SupplierMapper;
import com.bomaos.common.system.service.SupplierService;
import org.springframework.stereotype.Service;

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

/**
 * 供应商服务实现类
 */
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements SupplierService {

    @Override
    public PageResult<Supplier> listPage(PageParam<Supplier> page) {
        List<Supplier> records = baseMapper.listPage(page);
        return new PageResult<>(records, page.getTotal());
    }

    @Override
    public List<Supplier> listAll(Map<String, Object> page) {
        return baseMapper.listAll(page);
    }

}
