package com.fs.his.mapper;

import java.util.List;
import com.fs.his.domain.FsDoctorPrescribeDrug;
import org.apache.ibatis.annotations.Delete;

/**
 * 医生处方药品Mapper接口
 *
 * @author fs
 * @date 2023-08-08
 */
public interface FsDoctorPrescribeDrugMapper
{
    /**
     * 查询医生处方药品
     *
     * @param drugId 医生处方药品主键
     * @return 医生处方药品
     */
    public FsDoctorPrescribeDrug selectFsDoctorPrescribeDrugByDrugId(Long drugId);

    /**
     * 查询医生处方药品列表
     *
     * @param fsDoctorPrescribeDrug 医生处方药品
     * @return 医生处方药品集合
     */
    public List<FsDoctorPrescribeDrug> selectFsDoctorPrescribeDrugList(FsDoctorPrescribeDrug fsDoctorPrescribeDrug);

    /**
     * 新增医生处方药品
     *
     * @param fsDoctorPrescribeDrug 医生处方药品
     * @return 结果
     */
    public int insertFsDoctorPrescribeDrug(FsDoctorPrescribeDrug fsDoctorPrescribeDrug);

    /**
     * 修改医生处方药品
     *
     * @param fsDoctorPrescribeDrug 医生处方药品
     * @return 结果
     */
    public int updateFsDoctorPrescribeDrug(FsDoctorPrescribeDrug fsDoctorPrescribeDrug);

    /**
     * 删除医生处方药品
     *
     * @param drugId 医生处方药品主键
     * @return 结果
     */
    public int deleteFsDoctorPrescribeDrugByDrugId(Long drugId);

    /**
     * 批量删除医生处方药品
     *
     * @param drugIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsDoctorPrescribeDrugByDrugIds(Long[] drugIds);
    @Delete(" delete from fs_doctor_prescribe_drug where prescribe_id =#{prescribeId}  ")
    int deleteFsDoctorPrescribeDrugByPrescribe(Long prescribeId);
}
