package com.goomood.phm.service.impl;

import java.util.List;
import com.goomood.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.goomood.phm.mapper.BasicSpecialityMapper;
import com.goomood.phm.domain.BasicSpeciality;
import com.goomood.phm.service.IBasicSpecialityService;

/**
 * 专业管理Service业务层处理
 * 
 * @author goomood
 * @date 2024-11-16
 */
@Service
public class BasicSpecialityServiceImpl implements IBasicSpecialityService 
{
    @Autowired
    private BasicSpecialityMapper basicSpecialityMapper;

    /**
     * 查询专业管理
     * 
     * @param id 专业管理主键
     * @return 专业管理
     */
    @Override
    public BasicSpeciality selectBasicSpecialityById(Long id)
    {
        return basicSpecialityMapper.selectBasicSpecialityById(id);
    }

    /**
     * 查询专业管理列表
     * 
     * @param basicSpeciality 专业管理
     * @return 专业管理
     */
    @Override
    public List<BasicSpeciality> selectBasicSpecialityList(BasicSpeciality basicSpeciality)
    {
        return basicSpecialityMapper.selectBasicSpecialityList(basicSpeciality);
    }

    /**
     * 新增专业管理
     * 
     * @param basicSpeciality 专业管理
     * @return 结果
     */
    @Override
    public int insertBasicSpeciality(BasicSpeciality basicSpeciality)
    {
        basicSpeciality.setCreateTime(DateUtils.getNowDate());
        return basicSpecialityMapper.insertBasicSpeciality(basicSpeciality);
    }

    /**
     * 修改专业管理
     * 
     * @param basicSpeciality 专业管理
     * @return 结果
     */
    @Override
    public int updateBasicSpeciality(BasicSpeciality basicSpeciality)
    {
        basicSpeciality.setUpdateTime(DateUtils.getNowDate());
        return basicSpecialityMapper.updateBasicSpeciality(basicSpeciality);
    }

    /**
     * 批量删除专业管理
     * 
     * @param ids 需要删除的专业管理主键
     * @return 结果
     */
    @Override
    public int deleteBasicSpecialityByIds(Long[] ids)
    {
        return basicSpecialityMapper.deleteBasicSpecialityByIds(ids);
    }

    /**
     * 删除专业管理信息
     * 
     * @param id 专业管理主键
     * @return 结果
     */
    @Override
    public int deleteBasicSpecialityById(Long id)
    {
        return basicSpecialityMapper.deleteBasicSpecialityById(id);
    }
}
