package com.evobms.project.bms.service.impl;

import java.util.List;
import com.evobms.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.evobms.project.bms.mapper.BmsVoltageChannelDataMapper;
import com.evobms.project.bms.domain.BmsVoltageChannelData;
import com.evobms.project.bms.service.IBmsVoltageChannelDataService;

/**
 * BMS电压通道数据Service业务层处理
 * 
 * @author tzy
 * @date 2026-02-23
 */
@Service
public class BmsVoltageChannelDataServiceImpl extends ServiceImpl<BmsVoltageChannelDataMapper, BmsVoltageChannelData> implements IBmsVoltageChannelDataService 
{
    @Autowired
    private BmsVoltageChannelDataMapper bmsVoltageChannelDataMapper;

    /**
     * 查询BMS电压通道数据
     * 
     * @param id BMS电压通道数据主键
     * @return BMS电压通道数据
     */
    @Override
    public BmsVoltageChannelData selectBmsVoltageChannelDataById(Long id)
    {
        return bmsVoltageChannelDataMapper.selectBmsVoltageChannelDataById(id);
    }

    /**
     * 查询BMS电压通道数据列表
     * 
     * @param bmsVoltageChannelData BMS电压通道数据
     * @return BMS电压通道数据
     */
    @Override
    public List<BmsVoltageChannelData> selectBmsVoltageChannelDataList(BmsVoltageChannelData bmsVoltageChannelData)
    {
        return bmsVoltageChannelDataMapper.selectBmsVoltageChannelDataList(bmsVoltageChannelData);
    }

    /**
     * 新增BMS电压通道数据
     * 
     * @param bmsVoltageChannelData BMS电压通道数据
     * @return 结果
     */
    @Override
    public int insertBmsVoltageChannelData(BmsVoltageChannelData bmsVoltageChannelData)
    {
        bmsVoltageChannelData.setCreateTime(DateUtils.getNowDate());
        return bmsVoltageChannelDataMapper.insertBmsVoltageChannelData(bmsVoltageChannelData);
    }

    /**
     * 修改BMS电压通道数据
     * 
     * @param bmsVoltageChannelData BMS电压通道数据
     * @return 结果
     */
    @Override
    public int updateBmsVoltageChannelData(BmsVoltageChannelData bmsVoltageChannelData)
    {
        bmsVoltageChannelData.setUpdateTime(DateUtils.getNowDate());
        return bmsVoltageChannelDataMapper.updateBmsVoltageChannelData(bmsVoltageChannelData);
    }

    /**
     * 批量删除BMS电压通道数据
     * 
     * @param ids 需要删除的BMS电压通道数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsVoltageChannelDataByIds(Long[] ids)
    {
        return bmsVoltageChannelDataMapper.deleteBmsVoltageChannelDataByIds(ids);
    }

    /**
     * 删除BMS电压通道数据信息
     * 
     * @param id BMS电压通道数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsVoltageChannelDataById(Long id)
    {
        return bmsVoltageChannelDataMapper.deleteBmsVoltageChannelDataById(id);
    }
}
