package com.goldenwater.slaj.hazard.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.goldenwater.slaj.hazard.mapper.TBusiHazardArchiveMapper;
import com.goldenwater.slaj.hazard.domain.TBusiHazardArchive;
import com.goldenwater.slaj.hazard.service.ITBusiHazardArchiveService;

/**
 * 危险源档案 服务层实现
 */
@Service
public class TBusiHazardArchiveServiceImpl implements ITBusiHazardArchiveService {

    @Autowired
    private TBusiHazardArchiveMapper tBusiHazardArchiveMapper;

    /**
     * 查询危险源档案信息
     * @param guid 查询条件
     * @return 危险源档案信息
     */
    @Override
    public TBusiHazardArchive selectTBusiHazardArchiveByGuid(String guid) {
        return tBusiHazardArchiveMapper.selectTBusiHazardArchiveByGuid(guid);
    }

    /**
     * 查询危险源档案列表
     * @param tBusiHazardArchive 危险源档案查询条件
     * @return 危险源档案集合
     */
    @Override
    public List<TBusiHazardArchive> selectTBusiHazardArchiveList(TBusiHazardArchive tBusiHazardArchive) {
        return tBusiHazardArchiveMapper.selectTBusiHazardArchiveList(tBusiHazardArchive);
    }

    /**
     * 新增危险源档案
     * @param tBusiHazardArchive 危险源档案信息
     * @return 影响行数
     */
    @Override
    public int insertTBusiHazardArchive(TBusiHazardArchive tBusiHazardArchive) {
        return tBusiHazardArchiveMapper.insertTBusiHazardArchive(tBusiHazardArchive);
    }

    /**
     * 修改危险源档案
     * @param tBusiHazardArchive 危险源档案信息
     * @return 影响行数
     */
    @Override
    public int updateTBusiHazardArchive(TBusiHazardArchive tBusiHazardArchive) {
        return tBusiHazardArchiveMapper.updateTBusiHazardArchive(tBusiHazardArchive);
    }

    /**
     * 删除危险源档案
     * @param guid 危险源档案主键
     * @return 影响行数
     */
    @Override
    public int deleteTBusiHazardArchiveByGuid(String guid) {
        return tBusiHazardArchiveMapper.deleteTBusiHazardArchiveByGuid(guid);
    }

    /**
     * 批量删除危险源档案
     * @param guids 危险源档案主键数组
     * @return 影响行数
     */
    @Override
    public int deleteTBusiHazardArchiveByGuids(String[] guids) {
        return tBusiHazardArchiveMapper.deleteTBusiHazardArchiveByGuids(guids);
    }
}
