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.BmsChargeTemperatureMapper;
import com.evobms.project.bms.domain.BmsChargeTemperature;
import com.evobms.project.bms.service.IBmsChargeTemperatureService;

/**
 * BMS充电座温度数据Service业务层处理
 * 
 * @author tzy
 * @date 2026-02-23
 */
@Service
public class BmsChargeTemperatureServiceImpl extends ServiceImpl<BmsChargeTemperatureMapper, BmsChargeTemperature> implements IBmsChargeTemperatureService 
{
    @Autowired
    private BmsChargeTemperatureMapper bmsChargeTemperatureMapper;

    /**
     * 查询BMS充电座温度数据
     * 
     * @param id BMS充电座温度数据主键
     * @return BMS充电座温度数据
     */
    @Override
    public BmsChargeTemperature selectBmsChargeTemperatureById(Long id)
    {
        return bmsChargeTemperatureMapper.selectBmsChargeTemperatureById(id);
    }

    /**
     * 查询BMS充电座温度数据列表
     * 
     * @param bmsChargeTemperature BMS充电座温度数据
     * @return BMS充电座温度数据
     */
    @Override
    public List<BmsChargeTemperature> selectBmsChargeTemperatureList(BmsChargeTemperature bmsChargeTemperature)
    {
        return bmsChargeTemperatureMapper.selectBmsChargeTemperatureList(bmsChargeTemperature);
    }

    /**
     * 新增BMS充电座温度数据
     * 
     * @param bmsChargeTemperature BMS充电座温度数据
     * @return 结果
     */
    @Override
    public int insertBmsChargeTemperature(BmsChargeTemperature bmsChargeTemperature)
    {
        bmsChargeTemperature.setCreateTime(DateUtils.getNowDate());
        return bmsChargeTemperatureMapper.insertBmsChargeTemperature(bmsChargeTemperature);
    }

    /**
     * 修改BMS充电座温度数据
     * 
     * @param bmsChargeTemperature BMS充电座温度数据
     * @return 结果
     */
    @Override
    public int updateBmsChargeTemperature(BmsChargeTemperature bmsChargeTemperature)
    {
        bmsChargeTemperature.setUpdateTime(DateUtils.getNowDate());
        return bmsChargeTemperatureMapper.updateBmsChargeTemperature(bmsChargeTemperature);
    }

    /**
     * 批量删除BMS充电座温度数据
     * 
     * @param ids 需要删除的BMS充电座温度数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsChargeTemperatureByIds(Long[] ids)
    {
        return bmsChargeTemperatureMapper.deleteBmsChargeTemperatureByIds(ids);
    }

    /**
     * 删除BMS充电座温度数据信息
     * 
     * @param id BMS充电座温度数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsChargeTemperatureById(Long id)
    {
        return bmsChargeTemperatureMapper.deleteBmsChargeTemperatureById(id);
    }
}
