package com.tongran.mtragent.service.impl;

import com.tongran.common.core.utils.DateUtils;
import com.tongran.mtragent.domain.AllMtrClient;
import com.tongran.mtragent.mapper.AllMtrClientMapper;
import com.tongran.mtragent.service.IAllMtrClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * mtr探测丢包clinetId记录Service业务层处理
 * 
 * @author tongran
 * @date 2025-11-24
 */
@Service
public class AllMtrClientServiceImpl implements IAllMtrClientService 
{
    @Autowired
    private AllMtrClientMapper allMtrClientMapper;

    /**
     * 查询mtr探测丢包clinetId记录
     * 
     * @param id mtr探测丢包clinetId记录主键
     * @return mtr探测丢包clinetId记录
     */
    @Override
    public AllMtrClient selectAllMtrClientById(Long id)
    {
        return allMtrClientMapper.selectAllMtrClientById(id);
    }

    /**
     * 查询mtr探测丢包clinetId记录列表
     * 
     * @param allMtrClient mtr探测丢包clinetId记录
     * @return mtr探测丢包clinetId记录
     */
    @Override
    public List<AllMtrClient> selectAllMtrClientList(AllMtrClient allMtrClient)
    {
        return allMtrClientMapper.selectAllMtrClientList(allMtrClient);
    }

    /**
     * 新增mtr探测丢包clinetId记录
     * 
     * @param allMtrClient mtr探测丢包clinetId记录
     * @return 结果
     */
    @Override
    public int insertAllMtrClient(AllMtrClient allMtrClient)
    {
        allMtrClient.setCreateTime(DateUtils.getNowDate());
        return allMtrClientMapper.insertAllMtrClient(allMtrClient);
    }

    /**
     * 修改mtr探测丢包clinetId记录
     * 
     * @param allMtrClient mtr探测丢包clinetId记录
     * @return 结果
     */
    @Override
    public int updateAllMtrClient(AllMtrClient allMtrClient)
    {
        allMtrClient.setUpdateTime(DateUtils.getNowDate());
        return allMtrClientMapper.updateAllMtrClient(allMtrClient);
    }

    /**
     * 批量删除mtr探测丢包clinetId记录
     * 
     * @param ids 需要删除的mtr探测丢包clinetId记录主键
     * @return 结果
     */
    @Override
    public int deleteAllMtrClientByIds(Long[] ids)
    {
        return allMtrClientMapper.deleteAllMtrClientByIds(ids);
    }

    /**
     * 删除mtr探测丢包clinetId记录信息
     * 
     * @param id mtr探测丢包clinetId记录主键
     * @return 结果
     */
    @Override
    public int deleteAllMtrClientById(Long id)
    {
        return allMtrClientMapper.deleteAllMtrClientById(id);
    }

    @Override
    public int batchInsertAllMtrClient(List<AllMtrClient> allMtrClientList) {
        int rows = allMtrClientMapper.batchInsertAllMtrClient(allMtrClientList);
        return rows;
    }
}
