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.HazardSourceMapper;
import com.goldenwater.slaj.hazard.domain.HazardSource;
import com.goldenwater.slaj.hazard.service.IHazardSourceService;

/**
 * 危险源风险 服务层实现
 */
@Service
public class HazardSourceServiceImpl implements IHazardSourceService {

    @Autowired
    private HazardSourceMapper hazardSourceMapper;

    /**
     * 查询危险源风险信息
     * @param guid 查询条件
     * @return 危险源风险信息
     */
    @Override
    public HazardSource selectHazardSourceByGuid(String guid) {
        return hazardSourceMapper.selectHazardSourceByGuid(guid);
    }

    /**
     * 查询危险源风险列表
     * @param hazardSource 危险源风险查询条件
     * @return 危险源风险集合
     */
    @Override
    public List<HazardSource> selectHazardSourceList(HazardSource hazardSource) {
        return hazardSourceMapper.selectHazardSourceList(hazardSource);
    }

    /**
     * 新增危险源风险
     * @param hazardSource 危险源风险信息
     * @return 影响行数
     */
    @Override
    public int insertHazardSource(HazardSource hazardSource) {
        return hazardSourceMapper.insertHazardSource(hazardSource);
    }

    /**
     * 修改危险源风险
     * @param hazardSource 危险源风险信息
     * @return 影响行数
     */
    @Override
    public int updateHazardSource(HazardSource hazardSource) {
        return hazardSourceMapper.updateHazardSource(hazardSource);
    }

    /**
     * 删除危险源风险
     * @param guid 危险源风险主键
     * @return 影响行数
     */
    @Override
    public int deleteHazardSourceByGuid(String guid) {
        return hazardSourceMapper.deleteHazardSourceByGuid(guid);
    }

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