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.TConditionAccessoryMapper;
import com.ruoyi.shipping.domain.TConditionAccessory;
import com.ruoyi.shipping.service.ITConditionAccessoryService;

/**
 * 凯和附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-01
 */
@Service
public class TConditionAccessoryServiceImpl implements ITConditionAccessoryService 
{
    @Autowired
    private TConditionAccessoryMapper tConditionAccessoryMapper;

    /**
     * 查询凯和附件
     * 
     * @param fId 凯和附件ID
     * @return 凯和附件
     */
    @Override
    public TConditionAccessory selectTConditionAccessoryById(Long fId)
    {
        return tConditionAccessoryMapper.selectTConditionAccessoryById(fId);
    }

    /**
     * 查询凯和附件列表
     * 
     * @param tConditionAccessory 凯和附件
     * @return 凯和附件
     */
    @Override
    public List<TConditionAccessory> selectTConditionAccessoryList(TConditionAccessory tConditionAccessory)
    {
        return tConditionAccessoryMapper.selectTConditionAccessoryList(tConditionAccessory);
    }

    /**
     * 新增凯和附件
     * 
     * @param tConditionAccessory 凯和附件
     * @return 结果
     */
    @Override
    public int insertTConditionAccessory(TConditionAccessory tConditionAccessory)
    {
        tConditionAccessory.setCreateTime(DateUtils.getNowDate());
        return tConditionAccessoryMapper.insertTConditionAccessory(tConditionAccessory);
    }

    /**
     * 修改凯和附件
     * 
     * @param tConditionAccessory 凯和附件
     * @return 结果
     */
    @Override
    public int updateTConditionAccessory(TConditionAccessory tConditionAccessory)
    {
        tConditionAccessory.setUpdateTime(DateUtils.getNowDate());
        return tConditionAccessoryMapper.updateTConditionAccessory(tConditionAccessory);
    }

    /**
     * 批量删除凯和附件
     * 
     * @param fIds 需要删除的凯和附件ID
     * @return 结果
     */
    @Override
    public int deleteTConditionAccessoryByIds(Long[] fIds)
    {
        return tConditionAccessoryMapper.deleteTConditionAccessoryByIds(fIds);
    }

    /**
     * 删除凯和附件信息
     * 
     * @param fId 凯和附件ID
     * @return 结果
     */
    @Override
    public int deleteTConditionAccessoryById(Long fId)
    {
        return tConditionAccessoryMapper.deleteTConditionAccessoryById(fId);
    }
}
