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.PdEnrolldataEnterPlanMapper;
import com.ruoyi.back.domain.PdEnrolldataEnterPlan;
import com.ruoyi.back.service.IPdEnrolldataEnterPlanService;

/**
 * 招生计划Service业务层处理
 * 
 * @author voluntary
 * @date 2022-12-09
 */
@Service
public class PdEnrolldataEnterPlanServiceImpl implements IPdEnrolldataEnterPlanService 
{
    @Autowired
    private PdEnrolldataEnterPlanMapper pdEnrolldataEnterPlanMapper;

    /**
     * 查询招生计划
     * 
     * @param id 招生计划主键
     * @return 招生计划
     */
    @Override
    public PdEnrolldataEnterPlan selectPdEnrolldataEnterPlanById(String id)
    {
        return pdEnrolldataEnterPlanMapper.selectPdEnrolldataEnterPlanById(id);
    }

    /**
     * 查询招生计划列表
     * 
     * @param pdEnrolldataEnterPlan 招生计划
     * @return 招生计划
     */
    @Override
    public List<PdEnrolldataEnterPlan> selectPdEnrolldataEnterPlanList(PdEnrolldataEnterPlan pdEnrolldataEnterPlan)
    {
        return pdEnrolldataEnterPlanMapper.selectPdEnrolldataEnterPlanList(pdEnrolldataEnterPlan);
    }

    /**
     * 新增招生计划
     * 
     * @param pdEnrolldataEnterPlan 招生计划
     * @return 结果
     */
    @Override
    public int insertPdEnrolldataEnterPlan(PdEnrolldataEnterPlan pdEnrolldataEnterPlan)
    {
        pdEnrolldataEnterPlan.setCreateTime(DateUtils.getNowDate());
        return pdEnrolldataEnterPlanMapper.insertPdEnrolldataEnterPlan(pdEnrolldataEnterPlan);
    }

    /**
     * 修改招生计划
     * 
     * @param pdEnrolldataEnterPlan 招生计划
     * @return 结果
     */
    @Override
    public int updatePdEnrolldataEnterPlan(PdEnrolldataEnterPlan pdEnrolldataEnterPlan)
    {
        pdEnrolldataEnterPlan.setUpdateTime(DateUtils.getNowDate());
        return pdEnrolldataEnterPlanMapper.updatePdEnrolldataEnterPlan(pdEnrolldataEnterPlan);
    }

    /**
     * 批量删除招生计划
     * 
     * @param ids 需要删除的招生计划主键
     * @return 结果
     */
    @Override
    public int deletePdEnrolldataEnterPlanByIds(String[] ids)
    {
        return pdEnrolldataEnterPlanMapper.deletePdEnrolldataEnterPlanByIds(ids);
    }

    /**
     * 删除招生计划信息
     * 
     * @param id 招生计划主键
     * @return 结果
     */
    @Override
    public int deletePdEnrolldataEnterPlanById(String id)
    {
        return pdEnrolldataEnterPlanMapper.deletePdEnrolldataEnterPlanById(id);
    }
}
