package cn.cecep.talroad.mapper;

import cn.cecep.talroad.domain.BaseControlConcentStandards;
import java.util.List;
import java.util.Map;

import cn.cecep.talroad.domain.BaseRegionalControlObjectives;
import cn.cecep.talroad.domain.EarlyWarning;
import cn.cecep.talroad.domain.PcFactoryPollutant;
import cn.cecep.talroad.vo.BaseControlConcentStandardsVo;
import cn.cecep.talroad.vo.query.BaseControlConcentStandardsQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BaseControlConcentStandardsMapper extends BaseMapper<BaseControlConcentStandards> {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(BaseControlConcentStandards record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BaseControlConcentStandards record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    BaseControlConcentStandards selectByPrimaryKey(String id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(BaseControlConcentStandards record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(BaseControlConcentStandards record);

    int updateBatchSelective(List<BaseControlConcentStandards> list);

    int batchInsert(@Param("list") List<BaseControlConcentStandards> list);

    IPage<BaseControlConcentStandardsVo> selectListPage
            (Page<BaseRegionalControlObjectives> page, @Param("query") BaseControlConcentStandardsQuery query);

    List<EarlyWarning> selectWarningStandards();

    void updateAdviceEmissionAvg(@Param("standards") List<BaseControlConcentStandards> standards);

    Integer deletePollutant(@Param("code") String code, @Param("type") Integer type);

    List<PcFactoryPollutant> addPollutant(@Param("code") String code, @Param("type") Integer type);
}