package com.fastbee.rechargecard.service.impl;

import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.rechargecard.mapper.NgInformationWaterIntakeMapper;
import com.fastbee.rechargecard.domain.NgInformationWaterIntake;
import com.fastbee.rechargecard.service.INgInformationWaterIntakeService;

/**
 * 取水口信息Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-12-19
 */
@Service
public class NgInformationWaterIntakeServiceImpl implements INgInformationWaterIntakeService 
{
    @Autowired
    private NgInformationWaterIntakeMapper ngInformationWaterIntakeMapper;

    /**
     * 查询取水口信息
     * 
     * @param intakeId 取水口信息主键
     * @return 取水口信息
     */
    @Override
    public NgInformationWaterIntake selectNgInformationWaterIntakeByIntakeId(Long intakeId)
    {
        return ngInformationWaterIntakeMapper.selectNgInformationWaterIntakeByIntakeId(intakeId);
    }

    /**
     * 查询取水口信息列表
     * 
     * @param ngInformationWaterIntake 取水口信息
     * @return 取水口信息
     */
    @Override
    public List<NgInformationWaterIntake> selectNgInformationWaterIntakeList(NgInformationWaterIntake ngInformationWaterIntake)
    {
        return ngInformationWaterIntakeMapper.selectNgInformationWaterIntakeList(ngInformationWaterIntake);
    }

    /**
     * 新增取水口信息
     * 
     * @param ngInformationWaterIntake 取水口信息
     * @return 结果
     */
    @Override
    public int insertNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake)
    {
        ngInformationWaterIntake.setCreateTime(DateUtils.getNowDate());
        return ngInformationWaterIntakeMapper.insertNgInformationWaterIntake(ngInformationWaterIntake);
    }

    /**
     * 修改取水口信息
     * 
     * @param ngInformationWaterIntake 取水口信息
     * @return 结果
     */
    @Override
    public int updateNgInformationWaterIntake(NgInformationWaterIntake ngInformationWaterIntake)
    {
        ngInformationWaterIntake.setUpdateTime(DateUtils.getNowDate());
        return ngInformationWaterIntakeMapper.updateNgInformationWaterIntake(ngInformationWaterIntake);
    }

    /**
     * 批量删除取水口信息
     * 
     * @param intakeIds 需要删除的取水口信息主键
     * @return 结果
     */
    @Override
    public int deleteNgInformationWaterIntakeByIntakeIds(Long[] intakeIds)
    {
        return ngInformationWaterIntakeMapper.deleteNgInformationWaterIntakeByIntakeIds(intakeIds);
    }

    /**
     * 删除取水口信息信息
     * 
     * @param intakeId 取水口信息主键
     * @return 结果
     */
    @Override
    public int deleteNgInformationWaterIntakeByIntakeId(Long intakeId)
    {
        return ngInformationWaterIntakeMapper.deleteNgInformationWaterIntakeByIntakeId(intakeId);
    }
}
