package com.ruoyi.back.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.back.mapper.PdEnrolldataEnterPreMapper;
import com.ruoyi.back.domain.PdEnrolldataEnterPre;
import com.ruoyi.back.service.IPdEnrolldataEnterPreService;

/**
 * 提前批Service业务层处理
 * 
 * @author voluntary
 * @date 2022-12-09
 */
@Service
public class PdEnrolldataEnterPreServiceImpl implements IPdEnrolldataEnterPreService 
{
    @Autowired
    private PdEnrolldataEnterPreMapper pdEnrolldataEnterPreMapper;

    /**
     * 查询提前批
     * 
     * @param id 提前批主键
     * @return 提前批
     */
    @Override
    public PdEnrolldataEnterPre selectPdEnrolldataEnterPreById(String id)
    {
        return pdEnrolldataEnterPreMapper.selectPdEnrolldataEnterPreById(id);
    }

    /**
     * 查询提前批列表
     * 
     * @param pdEnrolldataEnterPre 提前批
     * @return 提前批
     */
    @Override
    public List<PdEnrolldataEnterPre> selectPdEnrolldataEnterPreList(PdEnrolldataEnterPre pdEnrolldataEnterPre)
    {
        return pdEnrolldataEnterPreMapper.selectPdEnrolldataEnterPreList(pdEnrolldataEnterPre);
    }

    /**
     * 新增提前批
     * 
     * @param pdEnrolldataEnterPre 提前批
     * @return 结果
     */
    @Override
    public int insertPdEnrolldataEnterPre(PdEnrolldataEnterPre pdEnrolldataEnterPre)
    {
        pdEnrolldataEnterPre.setCreateTime(DateUtils.getNowDate());
        return pdEnrolldataEnterPreMapper.insertPdEnrolldataEnterPre(pdEnrolldataEnterPre);
    }

    /**
     * 修改提前批
     * 
     * @param pdEnrolldataEnterPre 提前批
     * @return 结果
     */
    @Override
    public int updatePdEnrolldataEnterPre(PdEnrolldataEnterPre pdEnrolldataEnterPre)
    {
        pdEnrolldataEnterPre.setUpdateTime(DateUtils.getNowDate());
        return pdEnrolldataEnterPreMapper.updatePdEnrolldataEnterPre(pdEnrolldataEnterPre);
    }

    /**
     * 批量删除提前批
     * 
     * @param ids 需要删除的提前批主键
     * @return 结果
     */
    @Override
    public int deletePdEnrolldataEnterPreByIds(String[] ids)
    {
        return pdEnrolldataEnterPreMapper.deletePdEnrolldataEnterPreByIds(ids);
    }

    /**
     * 删除提前批信息
     * 
     * @param id 提前批主键
     * @return 结果
     */
    @Override
    public int deletePdEnrolldataEnterPreById(String id)
    {
        return pdEnrolldataEnterPreMapper.deletePdEnrolldataEnterPreById(id);
    }
}
