package com.ztmap.project.zhny.energystorageoverview.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.energystorageoverview.mapper.TEnergyStorageOverviewMapper;
import com.ztmap.project.zhny.energystorageoverview.domain.TEnergyStorageOverview;
import com.ztmap.project.zhny.energystorageoverview.service.ITEnergyStorageOverviewService;
import com.ztmap.common.utils.text.Convert;

/**
 * 储能总览Service业务层处理
 * 
 * @author ztmap
 * @date 2023-10-09
 */
@Service
public class TEnergyStorageOverviewServiceImpl implements ITEnergyStorageOverviewService 
{
    @Autowired
    private TEnergyStorageOverviewMapper tEnergyStorageOverviewMapper;

    /**
     * 查询储能总览
     * 
     * @param id 储能总览ID
     * @return 储能总览
     */
    @Override
    public TEnergyStorageOverview selectTEnergyStorageOverviewById(Long id)
    {
        return tEnergyStorageOverviewMapper.selectTEnergyStorageOverviewById(id);
    }

    /**
     * 查询储能总览列表
     * 
     * @param tEnergyStorageOverview 储能总览
     * @return 储能总览
     */
    @Override
    public List<TEnergyStorageOverview> selectTEnergyStorageOverviewList(TEnergyStorageOverview tEnergyStorageOverview)
    {
        return tEnergyStorageOverviewMapper.selectTEnergyStorageOverviewList(tEnergyStorageOverview);
    }

    /**
     * 新增储能总览
     * 
     * @param tEnergyStorageOverview 储能总览
     * @return 结果
     */
    @Override
    public int insertTEnergyStorageOverview(TEnergyStorageOverview tEnergyStorageOverview)
    {
        tEnergyStorageOverview.setCreateTime(DateUtils.getNowDate());
        return tEnergyStorageOverviewMapper.insertTEnergyStorageOverview(tEnergyStorageOverview);
    }

    /**
     * 修改储能总览
     * 
     * @param tEnergyStorageOverview 储能总览
     * @return 结果
     */
    @Override
    public int updateTEnergyStorageOverview(TEnergyStorageOverview tEnergyStorageOverview)
    {
        return tEnergyStorageOverviewMapper.updateTEnergyStorageOverview(tEnergyStorageOverview);
    }

    /**
     * 删除储能总览对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTEnergyStorageOverviewByIds(String ids)
    {
        return tEnergyStorageOverviewMapper.deleteTEnergyStorageOverviewByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除储能总览信息
     * 
     * @param id 储能总览ID
     * @return 结果
     */
    @Override
    public int deleteTEnergyStorageOverviewById(Long id)
    {
        return tEnergyStorageOverviewMapper.deleteTEnergyStorageOverviewById(id);
    }
}
