package com.fastbee.rechargecard.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.rechargecard.mapper.NgIrrigationAreaMapper;
import com.fastbee.rechargecard.domain.NgIrrigationArea;
import com.fastbee.rechargecard.service.INgIrrigationAreaService;

/**
 * 灌区Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-12-26
 */
@Service
public class NgIrrigationAreaServiceImpl implements INgIrrigationAreaService 
{
    @Autowired
    private NgIrrigationAreaMapper ngIrrigationAreaMapper;

    /**
     * 查询灌区
     * 
     * @param id 灌区主键
     * @return 灌区
     */
    @Override
    public NgIrrigationArea selectNgIrrigationAreaById(Long id)
    {
        return ngIrrigationAreaMapper.selectNgIrrigationAreaById(id);
    }

    /**
     * 查询灌区列表
     * 
     * @param ngIrrigationArea 灌区
     * @return 灌区
     */
    @Override
    public List<NgIrrigationArea> selectNgIrrigationAreaList(NgIrrigationArea ngIrrigationArea)
    {
        return ngIrrigationAreaMapper.selectNgIrrigationAreaList(ngIrrigationArea);
    }

    /**
     * 新增灌区
     * 
     * @param ngIrrigationArea 灌区
     * @return 结果
     */
    @Override
    public int insertNgIrrigationArea(NgIrrigationArea ngIrrigationArea)
    {
        return ngIrrigationAreaMapper.insertNgIrrigationArea(ngIrrigationArea);
    }

    /**
     * 修改灌区
     * 
     * @param ngIrrigationArea 灌区
     * @return 结果
     */
    @Override
    public int updateNgIrrigationArea(NgIrrigationArea ngIrrigationArea)
    {
        return ngIrrigationAreaMapper.updateNgIrrigationArea(ngIrrigationArea);
    }

    /**
     * 批量删除灌区
     * 
     * @param ids 需要删除的灌区主键
     * @return 结果
     */
    @Override
    public int deleteNgIrrigationAreaByIds(Long[] ids)
    {
        return ngIrrigationAreaMapper.deleteNgIrrigationAreaByIds(ids);
    }

    /**
     * 删除灌区信息
     * 
     * @param id 灌区主键
     * @return 结果
     */
    @Override
    public int deleteNgIrrigationAreaById(Long id)
    {
        return ngIrrigationAreaMapper.deleteNgIrrigationAreaById(id);
    }
}
