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.NgInformationVillageKeeperMapper;
import com.fastbee.rechargecard.domain.NgInformationVillageKeeper;
import com.fastbee.rechargecard.service.INgInformationVillageKeeperService;

/**
 * 村官员信息Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-12-19
 */
@Service
public class NgInformationVillageKeeperServiceImpl implements INgInformationVillageKeeperService 
{
    @Autowired
    private NgInformationVillageKeeperMapper ngInformationVillageKeeperMapper;

    /**
     * 查询村官员信息
     * 
     * @param villageKeeperId 村官员信息主键
     * @return 村官员信息
     */
    @Override
    public NgInformationVillageKeeper selectNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId)
    {
        return ngInformationVillageKeeperMapper.selectNgInformationVillageKeeperByVillageKeeperId(villageKeeperId);
    }

    /**
     * 查询村官员信息列表
     * 
     * @param ngInformationVillageKeeper 村官员信息
     * @return 村官员信息
     */
    @Override
    public List<NgInformationVillageKeeper> selectNgInformationVillageKeeperList(NgInformationVillageKeeper ngInformationVillageKeeper)
    {
        return ngInformationVillageKeeperMapper.selectNgInformationVillageKeeperList(ngInformationVillageKeeper);
    }

    /**
     * 新增村官员信息
     * 
     * @param ngInformationVillageKeeper 村官员信息
     * @return 结果
     */
    @Override
    public int insertNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper)
    {
        ngInformationVillageKeeper.setCreateTime(DateUtils.getNowDate());
        return ngInformationVillageKeeperMapper.insertNgInformationVillageKeeper(ngInformationVillageKeeper);
    }

    /**
     * 修改村官员信息
     * 
     * @param ngInformationVillageKeeper 村官员信息
     * @return 结果
     */
    @Override
    public int updateNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper)
    {
        ngInformationVillageKeeper.setUpdateTime(DateUtils.getNowDate());
        return ngInformationVillageKeeperMapper.updateNgInformationVillageKeeper(ngInformationVillageKeeper);
    }

    /**
     * 批量删除村官员信息
     * 
     * @param villageKeeperIds 需要删除的村官员信息主键
     * @return 结果
     */
    @Override
    public int deleteNgInformationVillageKeeperByVillageKeeperIds(Long[] villageKeeperIds)
    {
        return ngInformationVillageKeeperMapper.deleteNgInformationVillageKeeperByVillageKeeperIds(villageKeeperIds);
    }

    /**
     * 删除村官员信息信息
     * 
     * @param villageKeeperId 村官员信息主键
     * @return 结果
     */
    @Override
    public int deleteNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId)
    {
        return ngInformationVillageKeeperMapper.deleteNgInformationVillageKeeperByVillageKeeperId(villageKeeperId);
    }
}
