package com.ruoyi.shipping.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shipping.mapper.TCntrtrackingMapper;
import com.ruoyi.shipping.domain.TCntrtracking;
import com.ruoyi.shipping.service.ITCntrtrackingService;

/**
 * 箱跟踪Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-22
 */
@Service
public class TCntrtrackingServiceImpl implements ITCntrtrackingService 
{
    @Autowired
    private TCntrtrackingMapper tCntrtrackingMapper;

    /**
     * 查询箱跟踪
     * 
     * @param fId 箱跟踪ID
     * @return 箱跟踪
     */
    @Override
    public TCntrtracking selectTCntrtrackingById(Long fId)
    {
        return tCntrtrackingMapper.selectTCntrtrackingById(fId);
    }

    /**
     * 查询箱跟踪列表
     * 
     * @param tCntrtracking 箱跟踪
     * @return 箱跟踪
     */
    @Override
    public List<TCntrtracking> selectTCntrtrackingList(TCntrtracking tCntrtracking)
    {
        return tCntrtrackingMapper.selectTCntrtrackingList(tCntrtracking);
    }

    /**
     * 新增箱跟踪
     * 
     * @param tCntrtracking 箱跟踪
     * @return 结果
     */
    @Override
    public int insertTCntrtracking(TCntrtracking tCntrtracking)
    {
        tCntrtracking.setCreateTime(DateUtils.getNowDate());
        return tCntrtrackingMapper.insertTCntrtracking(tCntrtracking);
    }

    /**
     * 修改箱跟踪
     * 
     * @param tCntrtracking 箱跟踪
     * @return 结果
     */
    @Override
    public int updateTCntrtracking(TCntrtracking tCntrtracking)
    {
        tCntrtracking.setUpdateTime(DateUtils.getNowDate());
        return tCntrtrackingMapper.updateTCntrtracking(tCntrtracking);
    }

    /**
     * 批量删除箱跟踪
     * 
     * @param fIds 需要删除的箱跟踪ID
     * @return 结果
     */
    @Override
    public int deleteTCntrtrackingByIds(Long[] fIds)
    {
        return tCntrtrackingMapper.deleteTCntrtrackingByIds(fIds);
    }

    /**
     * 删除箱跟踪信息
     * 
     * @param fId 箱跟踪ID
     * @return 结果
     */
    @Override
    public int deleteTCntrtrackingById(Long fId)
    {
        return tCntrtrackingMapper.deleteTCntrtrackingById(fId);
    }
}
