package com.ruoyi.sy.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.sy.mapper.SyMajorCareerProspectsMapper;
import com.ruoyi.sy.domain.SyMajorCareerProspects;
import com.ruoyi.sy.service.ISyMajorCareerProspectsService;

/**
 * 专业就业前景Service业务层处理
 * 
 * @author mingxue
 * @date 2022-04-09
 */
@Service
public class SyMajorCareerProspectsServiceImpl implements ISyMajorCareerProspectsService 
{
    @Autowired
    private SyMajorCareerProspectsMapper syMajorCareerProspectsMapper;

    /**
     * 查询专业就业前景
     * 
     * @param id 专业就业前景ID
     * @return 专业就业前景
     */
    @Override
    public SyMajorCareerProspects selectSyMajorCareerProspectsById(Long id)
    {
        return syMajorCareerProspectsMapper.selectSyMajorCareerProspectsById(id);
    }

    @Override
    public SyMajorCareerProspects selectSyMajorCareerProspectsByCode(String code) {
        return syMajorCareerProspectsMapper.selectSyMajorCareerProspectsByCode(code);
    }

    @Override
    public List<SyMajorCareerProspects> selectSyMajorCareerProspectsByCodes(List<String> codes) {
        return syMajorCareerProspectsMapper.selectSyMajorCareerProspectsByCodes(codes);
    }

    /**
     * 查询专业就业前景列表
     * 
     * @param syMajorCareerProspects 专业就业前景
     * @return 专业就业前景
     */
    @Override
    public List<SyMajorCareerProspects> selectSyMajorCareerProspectsList(SyMajorCareerProspects syMajorCareerProspects)
    {
        return syMajorCareerProspectsMapper.selectSyMajorCareerProspectsList(syMajorCareerProspects);
    }

    /**
     * 新增专业就业前景
     * 
     * @param syMajorCareerProspects 专业就业前景
     * @return 结果
     */
    @Override
    public int insertSyMajorCareerProspects(SyMajorCareerProspects syMajorCareerProspects)
    {
        syMajorCareerProspects.setCreateTime(DateUtils.getNowDate());
        return syMajorCareerProspectsMapper.insertSyMajorCareerProspects(syMajorCareerProspects);
    }

    /**
     * 修改专业就业前景
     * 
     * @param syMajorCareerProspects 专业就业前景
     * @return 结果
     */
    @Override
    public int updateSyMajorCareerProspects(SyMajorCareerProspects syMajorCareerProspects)
    {
        return syMajorCareerProspectsMapper.updateSyMajorCareerProspects(syMajorCareerProspects);
    }

    /**
     * 批量删除专业就业前景
     * 
     * @param ids 需要删除的专业就业前景ID
     * @return 结果
     */
    @Override
    public int deleteSyMajorCareerProspectsByIds(Long[] ids)
    {
        return syMajorCareerProspectsMapper.deleteSyMajorCareerProspectsByIds(ids);
    }

    /**
     * 删除专业就业前景信息
     * 
     * @param id 专业就业前景ID
     * @return 结果
     */
    @Override
    public int deleteSyMajorCareerProspectsById(Long id)
    {
        return syMajorCareerProspectsMapper.deleteSyMajorCareerProspectsById(id);
    }
}
