package com.ztmap.project.zhny.energystoragecncfdl.service.impl;

import java.util.List;
import com.ztmap.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztmap.project.zhny.energystoragecncfdl.mapper.TEnergyStorageCncfdlMapper;
import com.ztmap.project.zhny.energystoragecncfdl.domain.TEnergyStorageCncfdl;
import com.ztmap.project.zhny.energystoragecncfdl.service.ITEnergyStorageCncfdlService;
import com.ztmap.common.utils.text.Convert;

/**
 * 储能充放电量Service业务层处理
 * 
 * @author ztmap
 * @date 2023-10-09
 */
@Service
public class TEnergyStorageCncfdlServiceImpl implements ITEnergyStorageCncfdlService 
{
    @Autowired
    private TEnergyStorageCncfdlMapper tEnergyStorageCncfdlMapper;

    /**
     * 查询储能充放电量
     * 
     * @param id 储能充放电量ID
     * @return 储能充放电量
     */
    @Override
    public TEnergyStorageCncfdl selectTEnergyStorageCncfdlById(Long id)
    {
        return tEnergyStorageCncfdlMapper.selectTEnergyStorageCncfdlById(id);
    }

    /**
     * 查询储能充放电量列表
     * 
     * @param tEnergyStorageCncfdl 储能充放电量
     * @return 储能充放电量
     */
    @Override
    public List<TEnergyStorageCncfdl> selectTEnergyStorageCncfdlList(TEnergyStorageCncfdl tEnergyStorageCncfdl)
    {
        return tEnergyStorageCncfdlMapper.selectTEnergyStorageCncfdlList(tEnergyStorageCncfdl);
    }

    /**
     * 新增储能充放电量
     * 
     * @param tEnergyStorageCncfdl 储能充放电量
     * @return 结果
     */
    @Override
    public int insertTEnergyStorageCncfdl(TEnergyStorageCncfdl tEnergyStorageCncfdl)
    {
        tEnergyStorageCncfdl.setCreateTime(DateUtils.getNowDate());
        return tEnergyStorageCncfdlMapper.insertTEnergyStorageCncfdl(tEnergyStorageCncfdl);
    }

    /**
     * 修改储能充放电量
     * 
     * @param tEnergyStorageCncfdl 储能充放电量
     * @return 结果
     */
    @Override
    public int updateTEnergyStorageCncfdl(TEnergyStorageCncfdl tEnergyStorageCncfdl)
    {
        return tEnergyStorageCncfdlMapper.updateTEnergyStorageCncfdl(tEnergyStorageCncfdl);
    }

    /**
     * 删除储能充放电量对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTEnergyStorageCncfdlByIds(String ids)
    {
        return tEnergyStorageCncfdlMapper.deleteTEnergyStorageCncfdlByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除储能充放电量信息
     * 
     * @param id 储能充放电量ID
     * @return 结果
     */
    @Override
    public int deleteTEnergyStorageCncfdlById(Long id)
    {
        return tEnergyStorageCncfdlMapper.deleteTEnergyStorageCncfdlById(id);
    }
}
