package com.ruoyi.project.ticket.service.impl;

import com.ruoyi.project.ticket.domain.TDelayPermit;
import com.ruoyi.project.ticket.mapper.TDelayPermitMapper;
import com.ruoyi.project.ticket.service.ITDelayPermitService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 延期票主体对象Service业务层处理
 *
 * @author ruoyi
 * @date 2021-12-23
 */
@Service
public class TDelayPermitServiceImpl implements ITDelayPermitService {

    @Resource
    private TDelayPermitMapper tDelayPermitMapper;

    /**
     * 查询延期票主体对象
     *
     * @param id 延期票主体对象ID
     * @return 延期票主体对象
     */
    @Override
    public TDelayPermit selectTDelayPermitById(Long id) {
        return tDelayPermitMapper.selectTDelayPermitById(id);
    }

    /**
     * 查询延期票主体对象列表
     *
     * @param tDelayPermit 延期票主体对象
     * @return 延期票主体对象
     */
    @Override
    public List<TDelayPermit> selectTDelayPermitList(TDelayPermit tDelayPermit) {
        return tDelayPermitMapper.selectTDelayPermitList(tDelayPermit);
    }

    @Override
    public Long selectVid() {
        return this.tDelayPermitMapper.selectVid();
    }

    @Override
    public List<TDelayPermit> selectDelayCount(TDelayPermit tDelayPermit) {
        return this.tDelayPermitMapper.selectDelayCount(tDelayPermit);
    }

    /**
     * 新增延期票主体对象
     *
     * @param tDelayPermit 延期票主体对象
     * @return 结果
     */
    @Override
    public int insertTDelayPermit(TDelayPermit tDelayPermit) {
        return tDelayPermitMapper.insertTDelayPermit(tDelayPermit);
    }

    /**
     * 修改延期票主体对象
     *
     * @param tDelayPermit 延期票主体对象
     * @return 结果
     */
    @Override
    public int updateTDelayPermit(TDelayPermit tDelayPermit) {
        return tDelayPermitMapper.updateTDelayPermit(tDelayPermit);
    }

    /**
     * 批量删除延期票主体对象
     *
     * @param ids 需要删除的延期票主体对象ID
     * @return 结果
     */
    @Override
    public int deleteTDelayPermitByIds(Long[] ids) {
        return tDelayPermitMapper.deleteTDelayPermitByIds(ids);
    }

    /**
     * 删除延期票主体对象信息
     *
     * @param id 延期票主体对象ID
     * @return 结果
     */
    @Override
    public int deleteTDelayPermitById(Long id) {
        return tDelayPermitMapper.deleteTDelayPermitById(id);
    }
}
