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.DoctorLevelMaterialMapper;
import com.fs.doctor.domain.DoctorLevelMaterial;
import com.fs.doctor.service.IDoctorLevelMaterialService;

/**
 * 定级证明材料Service业务层处理
 * 
 * @author fs
 * @date 2025-12-30
 */
@Service
public class DoctorLevelMaterialServiceImpl implements IDoctorLevelMaterialService 
{
    @Autowired
    private DoctorLevelMaterialMapper doctorLevelMaterialMapper;

    /**
     * 查询定级证明材料
     * 
     * @param id 定级证明材料主键
     * @return 定级证明材料
     */
    @Override
    public DoctorLevelMaterial selectDoctorLevelMaterialById(Long id)
    {
        return doctorLevelMaterialMapper.selectDoctorLevelMaterialById(id);
    }

    /**
     * 查询定级证明材料列表
     * 
     * @param doctorLevelMaterial 定级证明材料
     * @return 定级证明材料
     */
    @Override
    public List<DoctorLevelMaterial> selectDoctorLevelMaterialList(DoctorLevelMaterial doctorLevelMaterial)
    {
        return doctorLevelMaterialMapper.selectDoctorLevelMaterialList(doctorLevelMaterial);
    }

    /**
     * 新增定级证明材料
     * 
     * @param doctorLevelMaterial 定级证明材料
     * @return 结果
     */
    @Override
    public int insertDoctorLevelMaterial(DoctorLevelMaterial doctorLevelMaterial)
    {
        doctorLevelMaterial.setCreateTime(DateUtils.getNowDate());
        return doctorLevelMaterialMapper.insertDoctorLevelMaterial(doctorLevelMaterial);
    }

    /**
     * 修改定级证明材料
     * 
     * @param doctorLevelMaterial 定级证明材料
     * @return 结果
     */
    @Override
    public int updateDoctorLevelMaterial(DoctorLevelMaterial doctorLevelMaterial)
    {
        return doctorLevelMaterialMapper.updateDoctorLevelMaterial(doctorLevelMaterial);
    }

    /**
     * 批量删除定级证明材料
     * 
     * @param ids 需要删除的定级证明材料主键
     * @return 结果
     */
    @Override
    public int deleteDoctorLevelMaterialByIds(Long[] ids)
    {
        return doctorLevelMaterialMapper.deleteDoctorLevelMaterialByIds(ids);
    }

    /**
     * 删除定级证明材料信息
     * 
     * @param id 定级证明材料主键
     * @return 结果
     */
    @Override
    public int deleteDoctorLevelMaterialById(Long id)
    {
        return doctorLevelMaterialMapper.deleteDoctorLevelMaterialById(id);
    }
}
