package com.zehong.system.service.impl;

import com.zehong.system.domain.TEmergencyResources;
import com.zehong.system.mapper.TEmergencyResourcesMapper;
import com.zehong.system.service.ITEmergencyResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 应急资源Service业务层处理
 *
 * @author zehong
 * @date 2025-06-16
 */
@Service
public class TEmergencyResourcesServiceImpl implements ITEmergencyResourcesService
{
    @Autowired
    private TEmergencyResourcesMapper tEmergencyResourcesMapper;

    /**
     * 查询应急资源
     *
     * @param id 应急资源ID
     * @return 应急资源
     */
    @Override
    public TEmergencyResources selectTEmergencyResourcesById(Long id)
    {
        return tEmergencyResourcesMapper.selectTEmergencyResourcesById(id);
    }

    /**
     * 查询应急资源列表
     *
     * @param tEmergencyResources 应急资源
     * @return 应急资源
     */
    @Override
    public List<TEmergencyResources> selectTEmergencyResourcesList(TEmergencyResources tEmergencyResources)
    {
        return tEmergencyResourcesMapper.selectTEmergencyResourcesList(tEmergencyResources);
    }

    /**
     * 新增应急资源
     *
     * @param tEmergencyResources 应急资源
     * @return 结果
     */
    @Override
    public int insertTEmergencyResources(TEmergencyResources tEmergencyResources)
    {
        return tEmergencyResourcesMapper.insertTEmergencyResources(tEmergencyResources);
    }

    /**
     * 修改应急资源
     *
     * @param tEmergencyResources 应急资源
     * @return 结果
     */
    @Override
    public int updateTEmergencyResources(TEmergencyResources tEmergencyResources)
    {
        return tEmergencyResourcesMapper.updateTEmergencyResources(tEmergencyResources);
    }

    /**
     * 批量删除应急资源
     *
     * @param ids 需要删除的应急资源ID
     * @return 结果
     */
    @Override
    public int deleteTEmergencyResourcesByIds(Long[] ids)
    {
        return tEmergencyResourcesMapper.deleteTEmergencyResourcesByIds(ids);
    }

    /**
     * 删除应急资源信息
     *
     * @param id 应急资源ID
     * @return 结果
     */
    @Override
    public int deleteTEmergencyResourcesById(Long id)
    {
        return tEmergencyResourcesMapper.deleteTEmergencyResourcesById(id);
    }
}