package com.ruoyi.project.service.impl;

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

import com.ruoyi.project.domain.TrsSensitiveResults;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.TrsPolicyResultsMapper;
import com.ruoyi.project.domain.TrsPolicyResults;
import com.ruoyi.project.service.ITrsPolicyResultsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 政治常识监测Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-24
 */
@Service
public class TrsPolicyResultsServiceImpl implements ITrsPolicyResultsService 
{
    @Autowired
    private TrsPolicyResultsMapper trsPolicyResultsMapper;

    /**
     * 查询政治常识监测
     * 
     * @param id 政治常识监测主键
     * @return 政治常识监测
     */
    @Override
    public TrsPolicyResults selectTrsPolicyResultsById(Long id)
    {
        return trsPolicyResultsMapper.selectTrsPolicyResultsById(id);
    }

    /**
     * 查询政治常识监测列表
     * 
     * @param trsPolicyResults 政治常识监测
     * @return 政治常识监测
     */
    @Override
    public List<TrsPolicyResults> selectTrsPolicyResultsList(TrsPolicyResults trsPolicyResults)
    {
        return trsPolicyResultsMapper.selectTrsPolicyResultsList(trsPolicyResults);
    }

    /**
     * 新增政治常识监测
     * 
     * @param trsPolicyResults 政治常识监测
     * @return 结果
     */
    @Override
    public int insertTrsPolicyResults(TrsPolicyResults trsPolicyResults)
    {
        return trsPolicyResultsMapper.insertTrsPolicyResults(trsPolicyResults);
    }

    /**
     * 修改政治常识监测
     * 
     * @param trsPolicyResults 政治常识监测
     * @return 结果
     */
    @Override
    public int updateTrsPolicyResults(TrsPolicyResults trsPolicyResults)
    {
        return trsPolicyResultsMapper.updateTrsPolicyResults(trsPolicyResults);
    }

    /**
     * 批量删除政治常识监测
     * 
     * @param ids 需要删除的政治常识监测主键
     * @return 结果
     */
    @Override
    public int deleteTrsPolicyResultsByIds(String ids)
    {
        return trsPolicyResultsMapper.deleteTrsPolicyResultsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除政治常识监测信息
     * 
     * @param id 政治常识监测主键
     * @return 结果
     */
    @Override
    public int deleteTrsPolicyResultsById(Long id)
    {
        return trsPolicyResultsMapper.deleteTrsPolicyResultsById(id);
    }

    public Map<String, Integer> getStatistics(TrsPolicyResults trsSensitiveResults) {
        return trsPolicyResultsMapper.getStatistics(trsSensitiveResults);
    }

}
