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.TWarehousebillsCntrMapper;
import com.ruoyi.shipping.domain.TWarehousebillsCntr;
import com.ruoyi.shipping.service.ITWarehousebillsCntrService;

/**
 * 凯和订单从Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-08
 */
@Service
public class TWarehousebillsCntrServiceImpl implements ITWarehousebillsCntrService 
{
    @Autowired
    private TWarehousebillsCntrMapper tWarehousebillsCntrMapper;

    /**
     * 查询凯和订单从
     * 
     * @param fId 凯和订单从ID
     * @return 凯和订单从
     */
    @Override
    public TWarehousebillsCntr selectTWarehousebillsCntrById(Long fId)
    {
        return tWarehousebillsCntrMapper.selectTWarehousebillsCntrById(fId);
    }

    /**
     * 查询凯和订单从列表
     * 
     * @param tWarehousebillsCntr 凯和订单从
     * @return 凯和订单从
     */
    @Override
    public List<TWarehousebillsCntr> selectTWarehousebillsCntrList(TWarehousebillsCntr tWarehousebillsCntr)
    {
        return tWarehousebillsCntrMapper.selectTWarehousebillsCntrList(tWarehousebillsCntr);
    }

    /**
     * 新增凯和订单从
     * 
     * @param tWarehousebillsCntr 凯和订单从
     * @return 结果
     */
    @Override
    public int insertTWarehousebillsCntr(TWarehousebillsCntr tWarehousebillsCntr)
    {
        tWarehousebillsCntr.setCreateTime(DateUtils.getNowDate());
        return tWarehousebillsCntrMapper.insertTWarehousebillsCntr(tWarehousebillsCntr);
    }

    /**
     * 修改凯和订单从
     * 
     * @param tWarehousebillsCntr 凯和订单从
     * @return 结果
     */
    @Override
    public int updateTWarehousebillsCntr(TWarehousebillsCntr tWarehousebillsCntr)
    {
        tWarehousebillsCntr.setUpdateTime(DateUtils.getNowDate());
        return tWarehousebillsCntrMapper.updateTWarehousebillsCntr(tWarehousebillsCntr);
    }

    /**
     * 批量删除凯和订单从
     * 
     * @param fIds 需要删除的凯和订单从ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsCntrByIds(Long[] fIds)
    {
        return tWarehousebillsCntrMapper.deleteTWarehousebillsCntrByIds(fIds);
    }

    /**
     * 删除凯和订单从信息
     * 
     * @param fId 凯和订单从ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsCntrById(Long fId)
    {
        return tWarehousebillsCntrMapper.deleteTWarehousebillsCntrById(fId);
    }
}
