package com.ruoyi.project.business.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.project.business.mapper.TpParabarRelatedModelMapper;
import com.ruoyi.project.business.domain.TpParabarRelatedModel;
import com.ruoyi.project.business.service.ITpParabarRelatedModelService;

import javax.annotation.Resource;

/**
 * 参数包关联梯型Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-28
 */
@Service
public class TpParabarRelatedModelServiceImpl implements ITpParabarRelatedModelService 
{
    @Resource
    private TpParabarRelatedModelMapper tpParabarRelatedModelMapper;

    /**
     * 查询参数包关联梯型
     * 
     * @param id 参数包关联梯型主键
     * @return 参数包关联梯型
     */
    @Override
    public TpParabarRelatedModel selectTpParabarRelatedModelById(Long id)
    {
        return tpParabarRelatedModelMapper.selectTpParabarRelatedModelById(id);
    }

    /**
     * 查询参数包关联梯型列表
     * 
     * @param tpParabarRelatedModel 参数包关联梯型
     * @return 参数包关联梯型
     */
    @Override
    public List<TpParabarRelatedModel> selectTpParabarRelatedModelList(TpParabarRelatedModel tpParabarRelatedModel)
    {
        return tpParabarRelatedModelMapper.selectTpParabarRelatedModelList(tpParabarRelatedModel);
    }

    /**
     * 新增参数包关联梯型
     * 
     * @param tpParabarRelatedModel 参数包关联梯型
     * @return 结果
     */
    @Override
    public int insertTpParabarRelatedModel(TpParabarRelatedModel tpParabarRelatedModel)
    {
        tpParabarRelatedModel.setCreateTime(DateUtils.getNowDate());
        return tpParabarRelatedModelMapper.insertTpParabarRelatedModel(tpParabarRelatedModel);
    }

    /**
     * 修改参数包关联梯型
     * 
     * @param tpParabarRelatedModel 参数包关联梯型
     * @return 结果
     */
    @Override
    public int updateTpParabarRelatedModel(TpParabarRelatedModel tpParabarRelatedModel)
    {
        tpParabarRelatedModel.setUpdateTime(DateUtils.getNowDate());
        return tpParabarRelatedModelMapper.updateTpParabarRelatedModel(tpParabarRelatedModel);
    }

    /**
     * 批量删除参数包关联梯型
     * 
     * @param ids 需要删除的参数包关联梯型主键
     * @return 结果
     */
    @Override
    public int deleteTpParabarRelatedModelByIds(Long[] ids)
    {
        return tpParabarRelatedModelMapper.deleteTpParabarRelatedModelByIds(ids);
    }

    /**
     * 删除参数包关联梯型信息
     * 
     * @param id 参数包关联梯型主键
     * @return 结果
     */
    @Override
    public int deleteTpParabarRelatedModelById(Long id)
    {
        return tpParabarRelatedModelMapper.deleteTpParabarRelatedModelById(id);
    }
}
