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.contract.TqContractLiftHistoryMapper;
import com.ruoyi.project.business.domain.TqContractLiftHistory;
import com.ruoyi.project.business.service.ITqContractLiftHistoryService;

import javax.annotation.Resource;

/**
 * 合同电梯履历Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-16
 */
@Service
public class TqContractLiftHistoryServiceImpl implements ITqContractLiftHistoryService 
{
    @Resource
    private TqContractLiftHistoryMapper tqContractLiftHistoryMapper;

    /**
     * 查询合同电梯履历
     * 
     * @param id 合同电梯履历主键
     * @return 合同电梯履历
     */
    @Override
    public TqContractLiftHistory selectTqContractLiftHistoryById(Long id)
    {
        return tqContractLiftHistoryMapper.selectTqContractLiftHistoryById(id);
    }

    /**
     * 查询合同电梯履历列表
     * 
     * @param tqContractLiftHistory 合同电梯履历
     * @return 合同电梯履历
     */
    @Override
    public List<TqContractLiftHistory> selectTqContractLiftHistoryList(TqContractLiftHistory tqContractLiftHistory)
    {
        return tqContractLiftHistoryMapper.selectTqContractLiftHistoryList(tqContractLiftHistory);
    }

    /**
     * 新增合同电梯履历
     * 
     * @param tqContractLiftHistory 合同电梯履历
     * @return 结果
     */
    @Override
    public int insertTqContractLiftHistory(TqContractLiftHistory tqContractLiftHistory)
    {
        tqContractLiftHistory.setCreateTime(DateUtils.getNowDate());
        return tqContractLiftHistoryMapper.insertTqContractLiftHistory(tqContractLiftHistory);
    }

    /**
     * 修改合同电梯履历
     * 
     * @param tqContractLiftHistory 合同电梯履历
     * @return 结果
     */
    @Override
    public int updateTqContractLiftHistory(TqContractLiftHistory tqContractLiftHistory)
    {
        tqContractLiftHistory.setUpdateTime(DateUtils.getNowDate());
        return tqContractLiftHistoryMapper.updateTqContractLiftHistory(tqContractLiftHistory);
    }

    /**
     * 批量删除合同电梯履历
     * 
     * @param ids 需要删除的合同电梯履历主键
     * @return 结果
     */
    @Override
    public int deleteTqContractLiftHistoryByIds(Long[] ids)
    {
        return tqContractLiftHistoryMapper.deleteTqContractLiftHistoryByIds(ids);
    }

    /**
     * 删除合同电梯履历信息
     * 
     * @param id 合同电梯履历主键
     * @return 结果
     */
    @Override
    public int deleteTqContractLiftHistoryById(Long id)
    {
        return tqContractLiftHistoryMapper.deleteTqContractLiftHistoryById(id);
    }
}
