package com.ztmap.project.zhny.energystoragecount.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.energystoragecount.mapper.TEnergyStorageChargeCountMapper;
import com.ztmap.project.zhny.energystoragecount.domain.TEnergyStorageChargeCount;
import com.ztmap.project.zhny.energystoragecount.service.ITEnergyStorageChargeCountService;
import com.ztmap.common.utils.text.Convert;

/**
 * 储能充能统计Service业务层处理
 * 
 * @author ztmap
 * @date 2023-10-09
 */
@Service
public class TEnergyStorageChargeCountServiceImpl implements ITEnergyStorageChargeCountService 
{
    @Autowired
    private TEnergyStorageChargeCountMapper tEnergyStorageChargeCountMapper;

    /**
     * 查询储能充能统计
     * 
     * @param id 储能充能统计ID
     * @return 储能充能统计
     */
    @Override
    public TEnergyStorageChargeCount selectTEnergyStorageChargeCountById(Long id)
    {
        return tEnergyStorageChargeCountMapper.selectTEnergyStorageChargeCountById(id);
    }

    /**
     * 查询储能充能统计列表
     * 
     * @param tEnergyStorageChargeCount 储能充能统计
     * @return 储能充能统计
     */
    @Override
    public List<TEnergyStorageChargeCount> selectTEnergyStorageChargeCountList(TEnergyStorageChargeCount tEnergyStorageChargeCount)
    {
        return tEnergyStorageChargeCountMapper.selectTEnergyStorageChargeCountList(tEnergyStorageChargeCount);
    }

    /**
     * 新增储能充能统计
     * 
     * @param tEnergyStorageChargeCount 储能充能统计
     * @return 结果
     */
    @Override
    public int insertTEnergyStorageChargeCount(TEnergyStorageChargeCount tEnergyStorageChargeCount)
    {
        tEnergyStorageChargeCount.setCreateTime(DateUtils.getNowDate());
        return tEnergyStorageChargeCountMapper.insertTEnergyStorageChargeCount(tEnergyStorageChargeCount);
    }

    /**
     * 修改储能充能统计
     * 
     * @param tEnergyStorageChargeCount 储能充能统计
     * @return 结果
     */
    @Override
    public int updateTEnergyStorageChargeCount(TEnergyStorageChargeCount tEnergyStorageChargeCount)
    {
        return tEnergyStorageChargeCountMapper.updateTEnergyStorageChargeCount(tEnergyStorageChargeCount);
    }

    /**
     * 删除储能充能统计对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTEnergyStorageChargeCountByIds(String ids)
    {
        return tEnergyStorageChargeCountMapper.deleteTEnergyStorageChargeCountByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除储能充能统计信息
     * 
     * @param id 储能充能统计ID
     * @return 结果
     */
    @Override
    public int deleteTEnergyStorageChargeCountById(Long id)
    {
        return tEnergyStorageChargeCountMapper.deleteTEnergyStorageChargeCountById(id);
    }
}
