package com.ruoyi.orderManagement.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.orderManagement.domain.Ftmsorderbillscntrs;
import com.ruoyi.orderManagement.mapper.FtmsorderbillscntrsMapper;
import com.ruoyi.orderManagement.service.IftmsorderbillscntrsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 箱型箱量Service业务层处理
 *
 * @author ruoyi
 * @date 2021-02-22
 */
@Service
public class FtmsorderbillscntrsServiceImpl implements IftmsorderbillscntrsService {
    @Autowired
    private FtmsorderbillscntrsMapper ftmsorderbillscntrsMapper;

    /**
     * 查询箱型箱量
     *
     * @param id 箱型箱量ID
     * @return 箱型箱量
     */
    @Override
    public Ftmsorderbillscntrs selectftmsorderbillscntrsById(Long id) {
        return ftmsorderbillscntrsMapper.selectftmsorderbillscntrsById(id);
    }

    /**
     * 查询箱型箱量列表
     *
     * @param ftmsorderbillscntrs 箱型箱量
     * @return 箱型箱量
     */
    @Override
    public List<Ftmsorderbillscntrs> selectftmsorderbillscntrsList(Ftmsorderbillscntrs ftmsorderbillscntrs) {
        return ftmsorderbillscntrsMapper.selectftmsorderbillscntrsList(ftmsorderbillscntrs);
    }

    /**
     * 新增箱型箱量
     *
     * @param ftmsorderbillscntrs 箱型箱量
     * @return 结果
     */
    @Override
    public int insertftmsorderbillscntrs(Ftmsorderbillscntrs ftmsorderbillscntrs) {
        ftmsorderbillscntrs.setCreateTime(DateUtils.getNowDate());
        return ftmsorderbillscntrsMapper.insertftmsorderbillscntrs(ftmsorderbillscntrs);
    }

    /**
     * 修改箱型箱量
     *
     * @param ftmsorderbillscntrs 箱型箱量
     * @return 结果
     */
    @Override
    public int updateftmsorderbillscntrs(Ftmsorderbillscntrs ftmsorderbillscntrs) {
        ftmsorderbillscntrs.setUpdateTime(DateUtils.getNowDate());
        return ftmsorderbillscntrsMapper.updateftmsorderbillscntrs(ftmsorderbillscntrs);
    }

    /**
     * 批量删除箱型箱量
     *
     * @param ids 需要删除的箱型箱量ID
     * @return 结果
     */
    @Override
    public int deleteftmsorderbillscntrsByIds(Long[] ids) {
        return ftmsorderbillscntrsMapper.deleteftmsorderbillscntrsByIds(ids);
    }

    /**
     * 删除箱型箱量信息
     *
     * @param id 箱型箱量ID
     * @return 结果
     */
    @Override
    public int deleteftmsorderbillscntrsById(Long id) {
        return ftmsorderbillscntrsMapper.deleteftmsorderbillscntrsById(id);
    }
}
