package com.fs.doctor.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.doctor.mapper.DoctorLevelMapper;
import com.fs.doctor.domain.DoctorLevel;
import com.fs.doctor.service.IDoctorLevelService;

/**
 * 讲者级别信息Service业务层处理
 * 
 * @author fs
 * @date 2025-12-30
 */
@Service
public class DoctorLevelServiceImpl implements IDoctorLevelService 
{
    @Autowired
    private DoctorLevelMapper doctorLevelMapper;

    /**
     * 查询讲者级别信息
     * 
     * @param id 讲者级别信息主键
     * @return 讲者级别信息
     */
    @Override
    public DoctorLevel selectDoctorLevelById(Long id)
    {
        return doctorLevelMapper.selectDoctorLevelById(id);
    }

    /**
     * 查询讲者级别信息列表
     * 
     * @param doctorLevel 讲者级别信息
     * @return 讲者级别信息
     */
    @Override
    public List<DoctorLevel> selectDoctorLevelList(DoctorLevel doctorLevel)
    {
        return doctorLevelMapper.selectDoctorLevelList(doctorLevel);
    }

    /**
     * 新增讲者级别信息
     * 
     * @param doctorLevel 讲者级别信息
     * @return 结果
     */
    @Override
    public int insertDoctorLevel(DoctorLevel doctorLevel)
    {
        doctorLevel.setCreateTime(DateUtils.getNowDate());
        return doctorLevelMapper.insertDoctorLevel(doctorLevel);
    }

    /**
     * 修改讲者级别信息
     * 
     * @param doctorLevel 讲者级别信息
     * @return 结果
     */
    @Override
    public int updateDoctorLevel(DoctorLevel doctorLevel)
    {
        doctorLevel.setUpdateTime(DateUtils.getNowDate());
        return doctorLevelMapper.updateDoctorLevel(doctorLevel);
    }

    /**
     * 批量删除讲者级别信息
     * 
     * @param ids 需要删除的讲者级别信息主键
     * @return 结果
     */
    @Override
    public int deleteDoctorLevelByIds(Long[] ids)
    {
        return doctorLevelMapper.deleteDoctorLevelByIds(ids);
    }

    /**
     * 删除讲者级别信息信息
     * 
     * @param id 讲者级别信息主键
     * @return 结果
     */
    @Override
    public int deleteDoctorLevelById(Long id)
    {
        return doctorLevelMapper.deleteDoctorLevelById(id);
    }

    @Override
    public DoctorLevel selectDoctorLevelByDoctorId(String doctorId) {
        return doctorLevelMapper.selectDoctorLevelByDoctorId(doctorId);
    }
}
