package com.ruoyi.shipping.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.shipping.domain.TShipDealItem;
import com.ruoyi.shipping.mapper.TShipDealItemMapper;
import com.ruoyi.shipping.service.ITShipDealItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 凯和费用协议明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-07
 */
@Service
public class TShipDealItemServiceImpl implements ITShipDealItemService
{
    @Autowired
    private TShipDealItemMapper tShipDealItemMapper;

    /**
     * 查询凯和费用协议明细
     * 
     * @param fId 凯和费用协议明细ID
     * @return 凯和费用协议明细
     */
    @Override
    public TShipDealItem selectTShipDealItemById(Long fId)
    {
        return tShipDealItemMapper.selectTShipDealItemById(fId);
    }

    /**
     * 查询凯和费用协议明细列表
     * 
     * @param tShipDealItem 凯和费用协议明细
     * @return 凯和费用协议明细
     */
    @Override
    public List<TShipDealItem> selectTShipDealItemList(TShipDealItem tShipDealItem)
    {
        return tShipDealItemMapper.selectTShipDealItemList(tShipDealItem);
    }

    /**
     * 新增凯和费用协议明细
     * 
     * @param tShipDealItem 凯和费用协议明细
     * @return 结果
     */
    @Override
    public int insertTShipDealItem(TShipDealItem tShipDealItem)
    {
        tShipDealItem.setCreateTime(DateUtils.getNowDate());
        return tShipDealItemMapper.insertTShipDealItem(tShipDealItem);
    }

    /**
     * 修改凯和费用协议明细
     * 
     * @param tShipDealItem 凯和费用协议明细
     * @return 结果
     */
    @Override
    public int updateTShipDealItem(TShipDealItem tShipDealItem)
    {
        tShipDealItem.setUpdateTime(DateUtils.getNowDate());
        return tShipDealItemMapper.updateTShipDealItem(tShipDealItem);
    }

    /**
     * 批量删除凯和费用协议明细
     * 
     * @param fIds 需要删除的凯和费用协议明细ID
     * @return 结果
     */
    @Override
    public int deleteTShipDealItemByIds(Long[] fIds)
    {
        return tShipDealItemMapper.deleteTShipDealItemByIds(fIds);
    }

    /**
     * 删除凯和费用协议明细信息
     * 
     * @param fId 凯和费用协议明细ID
     * @return 结果
     */
    @Override
    public int deleteTShipDealItemById(Long fId)
    {
        return tShipDealItemMapper.deleteTShipDealItemById(fId);
    }
}
