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.SyVocationalOverviewMapper;
import com.ruoyi.sy.domain.SyVocationalOverview;
import com.ruoyi.sy.service.ISyVocationalOverviewService;

/**
 * 职业概况Service业务层处理
 * 
 * @author mingxue
 * @date 2022-03-30
 */
@Service
public class SyVocationalOverviewServiceImpl implements ISyVocationalOverviewService 
{
    @Autowired
    private SyVocationalOverviewMapper syVocationalOverviewMapper;

    /**
     * 查询职业概况
     * 
     * @param id 职业概况ID
     * @return 职业概况
     */
    @Override
    public SyVocationalOverview selectSyVocationalOverviewById(Long id)
    {
        return syVocationalOverviewMapper.selectSyVocationalOverviewById(id);
    }

    /**
     * 查询职业概况列表
     * 
     * @param syVocationalOverview 职业概况
     * @return 职业概况
     */
    @Override
    public List<SyVocationalOverview> selectSyVocationalOverviewList(SyVocationalOverview syVocationalOverview)
    {
        return syVocationalOverviewMapper.selectSyVocationalOverviewList(syVocationalOverview);
    }

    @Override
    public SyVocationalOverview selectSyVocationalOverviewByCode(String code)
    {
        return syVocationalOverviewMapper.selectSyVocationalOverviewByCode(code);
    }

    /**
     * 新增职业概况
     * 
     * @param syVocationalOverview 职业概况
     * @return 结果
     */
    @Override
    public int insertSyVocationalOverview(SyVocationalOverview syVocationalOverview)
    {
        syVocationalOverview.setCreateTime(DateUtils.getNowDate());
        return syVocationalOverviewMapper.insertSyVocationalOverview(syVocationalOverview);
    }

    /**
     * 修改职业概况
     * 
     * @param syVocationalOverview 职业概况
     * @return 结果
     */
    @Override
    public int updateSyVocationalOverview(SyVocationalOverview syVocationalOverview)
    {
        return syVocationalOverviewMapper.updateSyVocationalOverview(syVocationalOverview);
    }

    /**
     * 批量删除职业概况
     * 
     * @param ids 需要删除的职业概况ID
     * @return 结果
     */
    @Override
    public int deleteSyVocationalOverviewByIds(Long[] ids)
    {
        return syVocationalOverviewMapper.deleteSyVocationalOverviewByIds(ids);
    }

    /**
     * 删除职业概况信息
     * 
     * @param id 职业概况ID
     * @return 结果
     */
    @Override
    public int deleteSyVocationalOverviewById(Long id)
    {
        return syVocationalOverviewMapper.deleteSyVocationalOverviewById(id);
    }
}
