package com.srs.stureg.service.impl;

import java.util.List;
import com.srs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.srs.stureg.mapper.ArrivalInformationMapper;
import com.srs.stureg.domain.ArrivalInformation;
import com.srs.stureg.service.IArrivalInformationService;

/**
 * 到站信息登记Service业务层处理
 * 
 * @author 邓
 * @date 2023-05-20
 */
@Service
public class ArrivalInformationServiceImpl implements IArrivalInformationService 
{
    @Autowired
    private ArrivalInformationMapper arrivalInformationMapper;

    /**
     * 查询到站信息登记
     * 
     * @param arriveId 到站信息登记主键
     * @return 到站信息登记
     */
    @Override
    public ArrivalInformation selectArrivalInformationByArriveId(Long arriveId)
    {
        return arrivalInformationMapper.selectArrivalInformationByArriveId(arriveId);
    }

    /**
     * 查询到站信息登记列表
     * 
     * @param arrivalInformation 到站信息登记
     * @return 到站信息登记
     */
    @Override
    public List<ArrivalInformation> selectArrivalInformationList(ArrivalInformation arrivalInformation)
    {
        return arrivalInformationMapper.selectArrivalInformationList(arrivalInformation);
    }

    /**
     * 新增到站信息登记
     * 
     * @param arrivalInformation 到站信息登记
     * @return 结果
     */
    @Override
    public int insertArrivalInformation(ArrivalInformation arrivalInformation)
    {
        arrivalInformation.setCreateTime(DateUtils.getNowDate());
        return arrivalInformationMapper.insertArrivalInformation(arrivalInformation);
    }

    /**
     * 修改到站信息登记
     * 
     * @param arrivalInformation 到站信息登记
     * @return 结果
     */
    @Override
    public int updateArrivalInformation(ArrivalInformation arrivalInformation)
    {
        arrivalInformation.setUpdateTime(DateUtils.getNowDate());
        return arrivalInformationMapper.updateArrivalInformation(arrivalInformation);
    }

    /**
     * 批量删除到站信息登记
     * 
     * @param arriveIds 需要删除的到站信息登记主键
     * @return 结果
     */
    @Override
    public int deleteArrivalInformationByArriveIds(Long[] arriveIds)
    {
        return arrivalInformationMapper.deleteArrivalInformationByArriveIds(arriveIds);
    }

    /**
     * 删除到站信息登记信息
     * 
     * @param arriveId 到站信息登记主键
     * @return 结果
     */
    @Override
    public int deleteArrivalInformationByArriveId(Long arriveId)
    {
        return arrivalInformationMapper.deleteArrivalInformationByArriveId(arriveId);
    }
}
