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.NgRechargeMachinesMapper;
import com.fastbee.rechargecard.domain.NgRechargeMachines;
import com.fastbee.rechargecard.service.INgRechargeMachinesService;

/**
 * 充值机信息Service业务层处理
 *
 * @author kerwincui
 * @date 2024-12-19
 */
@Service
public class NgRechargeMachinesServiceImpl implements INgRechargeMachinesService
{
    @Autowired
    private NgRechargeMachinesMapper ngRechargeMachinesMapper;

    /**
     * 查询充值机信息
     *
     * @param id 充值机信息主键
     * @return 充值机信息
     */
    @Override
    public NgRechargeMachines selectNgRechargeMachinesById(Long id)
    {
        return ngRechargeMachinesMapper.selectNgRechargeMachinesById(id);
    }

    /**
     * 查询充值机信息列表
     *
     * @param ngRechargeMachines 充值机信息
     * @return 充值机信息
     */
    @Override
    public List<NgRechargeMachines> selectNgRechargeMachinesList(NgRechargeMachines ngRechargeMachines)
    {
        return ngRechargeMachinesMapper.selectNgRechargeMachinesList(ngRechargeMachines);
    }

    /**
     * 新增充值机信息
     *
     * @param ngRechargeMachines 充值机信息
     * @return 结果
     */
    @Override
    public int insertNgRechargeMachines(NgRechargeMachines ngRechargeMachines)
    {
        ngRechargeMachines.setCreateTime(DateUtils.getNowDate());
        return ngRechargeMachinesMapper.insertNgRechargeMachines(ngRechargeMachines);
    }

    /**
     * 修改充值机信息
     *
     * @param ngRechargeMachines 充值机信息
     * @return 结果
     */
    @Override
    public int updateNgRechargeMachines(NgRechargeMachines ngRechargeMachines)
    {
        ngRechargeMachines.setUpdateTime(DateUtils.getNowDate());
        return ngRechargeMachinesMapper.updateNgRechargeMachines(ngRechargeMachines);
    }

    /**
     * 批量删除充值机信息
     *
     * @param ids 需要删除的充值机信息主键
     * @return 结果
     */
    @Override
    public int deleteNgRechargeMachinesByIds(Long[] ids)
    {
        return ngRechargeMachinesMapper.deleteNgRechargeMachinesByIds(ids);
    }

    /**
     * 删除充值机信息信息
     *
     * @param id 充值机信息主键
     * @return 结果
     */
    @Override
    public int deleteNgRechargeMachinesById(Long id)
    {
        return ngRechargeMachinesMapper.deleteNgRechargeMachinesById(id);
    }
}
