package com.fs.his.mapper;

import java.util.List;
import com.fs.his.domain.FsDoctorPrice;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 医生价目Mapper接口
 *
 * @author fs
 * @date 2023-07-31
 */
public interface FsDoctorPriceMapper
{
    /**
     * 查询医生价目
     *
     * @param priceId 医生价目主键
     * @return 医生价目
     */
    public FsDoctorPrice selectFsDoctorPriceByPriceId(Long priceId);

    /**
     * 查询医生价目列表
     *
     * @param fsDoctorPrice 医生价目
     * @return 医生价目集合
     */
    public List<FsDoctorPrice> selectFsDoctorPriceList(FsDoctorPrice fsDoctorPrice);

    /**
     * 新增医生价目
     *
     * @param fsDoctorPrice 医生价目
     * @return 结果
     */
    public int insertFsDoctorPrice(FsDoctorPrice fsDoctorPrice);

    /**
     * 修改医生价目
     *
     * @param fsDoctorPrice 医生价目
     * @return 结果
     */
    public int updateFsDoctorPrice(FsDoctorPrice fsDoctorPrice);

    /**
     * 删除医生价目
     *
     * @param priceId 医生价目主键
     * @return 结果
     */
    public int deleteFsDoctorPriceByPriceId(Long priceId);

    /**
     * 批量删除医生价目
     *
     * @param priceIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsDoctorPriceByPriceIds(Long[] priceIds);

    @Select("select * from fs_doctor_price WHERE doctor_id=#{doctorId} ")
    List<FsDoctorPrice> selectDoctorPriceByDoctorId(Long doctorId);

    @Delete("delete from fs_doctor_price WHERE doctor_id=#{doctorId}")
    int deleteFsDoctorPriceByDoctorId(Long doctorId);
    @Update("update fs_doctor_price set price=#{price} , status=#{status} where doctor_id = #{doctorId} and price_type=#{priceType}")
    int updateFsDoctorPriceByDoctorId(FsDoctorPrice p);
}
