package com.ruoyi.orderManagement.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.orderManagement.domain.Ftmsorderbillsattachs;
import com.ruoyi.orderManagement.mapper.FtmsorderbillsattachsMapper;
import com.ruoyi.orderManagement.service.IftmsorderbillsattachsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 附件Service业务层处理
 *
 * @author ruoyi
 * @date 2021-02-22
 */
@Service
public class FtmsorderbillsattachsServiceImpl implements IftmsorderbillsattachsService {
    @Autowired
    private FtmsorderbillsattachsMapper ftmsorderbillsattachsMapper;

    /**
     * 查询附件
     *
     * @param id 附件ID
     * @return 附件
     */
    @Override
    public Ftmsorderbillsattachs selectftmsorderbillsattachsById(Long id) {
        return ftmsorderbillsattachsMapper.selectftmsorderbillsattachsById(id);
    }

    /**
     * 查询附件列表
     *
     * @param ftmsorderbillsattachs 附件
     * @return 附件
     */
    @Override
    public List<Ftmsorderbillsattachs> selectftmsorderbillsattachsList(Ftmsorderbillsattachs ftmsorderbillsattachs) {
        return ftmsorderbillsattachsMapper.selectftmsorderbillsattachsList(ftmsorderbillsattachs);
    }

    /**
     * 新增附件
     *
     * @param ftmsorderbillsattachs 附件
     * @return 结果
     */
    @Override
    public int insertftmsorderbillsattachs(Ftmsorderbillsattachs ftmsorderbillsattachs) {
        ftmsorderbillsattachs.setCreateTime(DateUtils.getNowDate());
        return ftmsorderbillsattachsMapper.insertftmsorderbillsattachs(ftmsorderbillsattachs);
    }

    /**
     * 修改附件
     *
     * @param ftmsorderbillsattachs 附件
     * @return 结果
     */
    @Override
    public int updateftmsorderbillsattachs(Ftmsorderbillsattachs ftmsorderbillsattachs) {
        ftmsorderbillsattachs.setUpdateTime(DateUtils.getNowDate());
        return ftmsorderbillsattachsMapper.updateftmsorderbillsattachs(ftmsorderbillsattachs);
    }

    /**
     * 批量删除附件
     *
     * @param ids 需要删除的附件ID
     * @return 结果
     */
    @Override
    public int deleteftmsorderbillsattachsByIds(Long[] ids) {
        return ftmsorderbillsattachsMapper.deleteftmsorderbillsattachsByIds(ids);
    }

    /**
     * 删除附件信息
     *
     * @param id 附件ID
     * @return 结果
     */
    @Override
    public int deleteftmsorderbillsattachsById(Long id) {
        return ftmsorderbillsattachsMapper.deleteftmsorderbillsattachsById(id);
    }
}
