package com.tongran.rocketmq.service.impl;

import java.util.List;
import com.tongran.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tongran.rocketmq.mapper.RmOutboundTrafficStatisticsMapper;
import com.tongran.rocketmq.domain.RmOutboundTrafficStatistics;
import com.tongran.rocketmq.service.IRmOutboundTrafficStatisticsService;

/**
 * 出省流量统计Service业务层处理
 * 
 * @author tongran
 * @date 2026-01-21
 */
@Service
public class RmOutboundTrafficStatisticsServiceImpl implements IRmOutboundTrafficStatisticsService 
{
    @Autowired
    private RmOutboundTrafficStatisticsMapper rmOutboundTrafficStatisticsMapper;

    /**
     * 查询出省流量统计
     * 
     * @param id 出省流量统计主键
     * @return 出省流量统计
     */
    @Override
    public RmOutboundTrafficStatistics selectRmOutboundTrafficStatisticsById(Long id)
    {
        return rmOutboundTrafficStatisticsMapper.selectRmOutboundTrafficStatisticsById(id);
    }

    /**
     * 查询出省流量统计列表
     * 
     * @param rmOutboundTrafficStatistics 出省流量统计
     * @return 出省流量统计
     */
    @Override
    public List<RmOutboundTrafficStatistics> selectRmOutboundTrafficStatisticsList(RmOutboundTrafficStatistics rmOutboundTrafficStatistics)
    {
        return rmOutboundTrafficStatisticsMapper.selectRmOutboundTrafficStatisticsList(rmOutboundTrafficStatistics);
    }

    /**
     * 新增出省流量统计
     * 
     * @param rmOutboundTrafficStatistics 出省流量统计
     * @return 结果
     */
    @Override
    public int insertRmOutboundTrafficStatistics(RmOutboundTrafficStatistics rmOutboundTrafficStatistics)
    {
        rmOutboundTrafficStatistics.setCreateTime(DateUtils.getNowDate());
        return rmOutboundTrafficStatisticsMapper.insertRmOutboundTrafficStatistics(rmOutboundTrafficStatistics);
    }

    /**
     * 修改出省流量统计
     * 
     * @param rmOutboundTrafficStatistics 出省流量统计
     * @return 结果
     */
    @Override
    public int updateRmOutboundTrafficStatistics(RmOutboundTrafficStatistics rmOutboundTrafficStatistics)
    {
        rmOutboundTrafficStatistics.setUpdateTime(DateUtils.getNowDate());
        return rmOutboundTrafficStatisticsMapper.updateRmOutboundTrafficStatistics(rmOutboundTrafficStatistics);
    }

    /**
     * 批量删除出省流量统计
     * 
     * @param ids 需要删除的出省流量统计主键
     * @return 结果
     */
    @Override
    public int deleteRmOutboundTrafficStatisticsByIds(Long[] ids)
    {
        return rmOutboundTrafficStatisticsMapper.deleteRmOutboundTrafficStatisticsByIds(ids);
    }

    /**
     * 删除出省流量统计信息
     * 
     * @param id 出省流量统计主键
     * @return 结果
     */
    @Override
    public int deleteRmOutboundTrafficStatisticsById(Long id)
    {
        return rmOutboundTrafficStatisticsMapper.deleteRmOutboundTrafficStatisticsById(id);
    }
}
