package cn.cecep.talroad.service.impl;

import cn.cecep.talroad.domain.PcPollutant;
import cn.cecep.talroad.mapper.PcPollutantMapper;
import cn.cecep.talroad.service.IPcPollutantService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;




/**
 * 污染物Service业务层处理
 *
 * @author szhpt
 * @date 2023-01-10*/
@Service
public class PcPollutantServiceImpl extends ServiceImpl<PcPollutantMapper,PcPollutant> implements IPcPollutantService
{
    @Autowired
    private PcPollutantMapper pcPollutantMapper;

    /**
     * 查询污染物列表
     *
     * @param pcPollutant 污染物
     * @return 污染物
     */
    @Override
    public List<PcPollutant> selectPcPollutantList(PcPollutant pcPollutant)
    {
        return pcPollutantMapper.selectPcPollutantList(pcPollutant);
    }

    @Override
    public List<PcPollutant> manualMonitoringPollutants(String pollutantType) {
        List<PcPollutant> pollCategory = pcPollutantMapper.selectList(new QueryWrapper<PcPollutant>().eq("poll_category", pollutantType));
        return pollCategory;
    }
}
